Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
spear-keyboard.c File Reference
#include <linux/clk.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/input.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/pm_wakeup.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/platform_data/keyboard-spear.h>

Go to the source code of this file.

Data Structures

struct  spear_kbd
 

Macros

#define MODE_CTL_REG   0x00
 
#define STATUS_REG   0x0C
 
#define DATA_REG   0x10
 
#define INTR_MASK   0x54
 
#define NUM_ROWS   16
 
#define NUM_COLS   16
 
#define MODE_CTL_PCLK_FREQ_SHIFT   9
 
#define MODE_CTL_PCLK_FREQ_MSK   0x7F
 
#define MODE_CTL_KEYBOARD   (0x2 << 0)
 
#define MODE_CTL_SCAN_RATE_10   (0x0 << 2)
 
#define MODE_CTL_SCAN_RATE_20   (0x1 << 2)
 
#define MODE_CTL_SCAN_RATE_40   (0x2 << 2)
 
#define MODE_CTL_SCAN_RATE_80   (0x3 << 2)
 
#define MODE_CTL_KEYNUM_SHIFT   6
 
#define MODE_CTL_START_SCAN   (0x1 << 8)
 
#define STATUS_DATA_AVAIL   (0x1 << 1)
 
#define DATA_ROW_MASK   0xF0
 
#define DATA_COLUMN_MASK   0x0F
 
#define ROW_SHIFT   4
 

Functions

 module_platform_driver (spear_kbd_driver)
 
 MODULE_AUTHOR ("Rajeev Kumar")
 
 MODULE_DESCRIPTION ("SPEAr Keyboard Driver")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define DATA_COLUMN_MASK   0x0F

Definition at line 52 of file spear-keyboard.c.

#define DATA_REG   0x10

Definition at line 32 of file spear-keyboard.c.

#define DATA_ROW_MASK   0xF0

Definition at line 51 of file spear-keyboard.c.

#define INTR_MASK   0x54

Definition at line 33 of file spear-keyboard.c.

#define MODE_CTL_KEYBOARD   (0x2 << 0)

Definition at line 41 of file spear-keyboard.c.

#define MODE_CTL_KEYNUM_SHIFT   6

Definition at line 46 of file spear-keyboard.c.

#define MODE_CTL_PCLK_FREQ_MSK   0x7F

Definition at line 39 of file spear-keyboard.c.

#define MODE_CTL_PCLK_FREQ_SHIFT   9

Definition at line 38 of file spear-keyboard.c.

#define MODE_CTL_REG   0x00

Definition at line 30 of file spear-keyboard.c.

#define MODE_CTL_SCAN_RATE_10   (0x0 << 2)

Definition at line 42 of file spear-keyboard.c.

#define MODE_CTL_SCAN_RATE_20   (0x1 << 2)

Definition at line 43 of file spear-keyboard.c.

#define MODE_CTL_SCAN_RATE_40   (0x2 << 2)

Definition at line 44 of file spear-keyboard.c.

#define MODE_CTL_SCAN_RATE_80   (0x3 << 2)

Definition at line 45 of file spear-keyboard.c.

#define MODE_CTL_START_SCAN   (0x1 << 8)

Definition at line 47 of file spear-keyboard.c.

#define NUM_COLS   16

Definition at line 37 of file spear-keyboard.c.

#define NUM_ROWS   16

Definition at line 36 of file spear-keyboard.c.

#define ROW_SHIFT   4

Definition at line 54 of file spear-keyboard.c.

#define STATUS_DATA_AVAIL   (0x1 << 1)

Definition at line 49 of file spear-keyboard.c.

#define STATUS_REG   0x0C

Definition at line 31 of file spear-keyboard.c.

Function Documentation

MODULE_AUTHOR ( "Rajeev Kumar"  )
MODULE_DESCRIPTION ( "SPEAr Keyboard Driver"  )
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( spear_kbd_driver  )