Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
stmpe-keypad.c File Reference
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/input/matrix_keypad.h>
#include <linux/mfd/stmpe.h>

Go to the source code of this file.

Data Structures

struct  stmpe_keypad_variant
 
struct  stmpe_keypad
 

Macros

#define STMPE_KPC_COL   0x60
 
#define STMPE_KPC_ROW_MSB   0x61
 
#define STMPE_KPC_ROW_LSB   0x62
 
#define STMPE_KPC_CTRL_MSB   0x63
 
#define STMPE_KPC_CTRL_LSB   0x64
 
#define STMPE_KPC_COMBI_KEY_0   0x65
 
#define STMPE_KPC_COMBI_KEY_1   0x66
 
#define STMPE_KPC_COMBI_KEY_2   0x67
 
#define STMPE_KPC_DATA_BYTE0   0x68
 
#define STMPE_KPC_DATA_BYTE1   0x69
 
#define STMPE_KPC_DATA_BYTE2   0x6a
 
#define STMPE_KPC_DATA_BYTE3   0x6b
 
#define STMPE_KPC_DATA_BYTE4   0x6c
 
#define STMPE_KPC_CTRL_LSB_SCAN   (0x1 << 0)
 
#define STMPE_KPC_CTRL_LSB_DEBOUNCE   (0x7f << 1)
 
#define STMPE_KPC_CTRL_MSB_SCAN_COUNT   (0xf << 4)
 
#define STMPE_KPC_ROW_MSB_ROWS   0xff
 
#define STMPE_KPC_DATA_UP   (0x1 << 7)
 
#define STMPE_KPC_DATA_ROW   (0xf << 3)
 
#define STMPE_KPC_DATA_COL   (0x7 << 0)
 
#define STMPE_KPC_DATA_NOKEY_MASK   0x78
 
#define STMPE_KEYPAD_MAX_DEBOUNCE   127
 
#define STMPE_KEYPAD_MAX_SCAN_COUNT   15
 
#define STMPE_KEYPAD_MAX_ROWS   8
 
#define STMPE_KEYPAD_MAX_COLS   8
 
#define STMPE_KEYPAD_ROW_SHIFT   3
 
#define STMPE_KEYPAD_KEYMAP_SIZE   (STMPE_KEYPAD_MAX_ROWS * STMPE_KEYPAD_MAX_COLS)
 

Functions

 module_platform_driver (stmpe_keypad_driver)
 
 MODULE_LICENSE ("GPL v2")
 
 MODULE_DESCRIPTION ("STMPExxxx keypad driver")
 
 MODULE_AUTHOR ("Rabin Vincent <[email protected]>")
 

Macro Definition Documentation

#define STMPE_KEYPAD_KEYMAP_SIZE   (STMPE_KEYPAD_MAX_ROWS * STMPE_KEYPAD_MAX_COLS)

Definition at line 49 of file stmpe-keypad.c.

#define STMPE_KEYPAD_MAX_COLS   8

Definition at line 47 of file stmpe-keypad.c.

#define STMPE_KEYPAD_MAX_DEBOUNCE   127

Definition at line 43 of file stmpe-keypad.c.

#define STMPE_KEYPAD_MAX_ROWS   8

Definition at line 46 of file stmpe-keypad.c.

#define STMPE_KEYPAD_MAX_SCAN_COUNT   15

Definition at line 44 of file stmpe-keypad.c.

#define STMPE_KEYPAD_ROW_SHIFT   3

Definition at line 48 of file stmpe-keypad.c.

#define STMPE_KPC_COL   0x60

Definition at line 18 of file stmpe-keypad.c.

#define STMPE_KPC_COMBI_KEY_0   0x65

Definition at line 23 of file stmpe-keypad.c.

#define STMPE_KPC_COMBI_KEY_1   0x66

Definition at line 24 of file stmpe-keypad.c.

#define STMPE_KPC_COMBI_KEY_2   0x67

Definition at line 25 of file stmpe-keypad.c.

#define STMPE_KPC_CTRL_LSB   0x64

Definition at line 22 of file stmpe-keypad.c.

#define STMPE_KPC_CTRL_LSB_DEBOUNCE   (0x7f << 1)

Definition at line 33 of file stmpe-keypad.c.

#define STMPE_KPC_CTRL_LSB_SCAN   (0x1 << 0)

Definition at line 32 of file stmpe-keypad.c.

#define STMPE_KPC_CTRL_MSB   0x63

Definition at line 21 of file stmpe-keypad.c.

#define STMPE_KPC_CTRL_MSB_SCAN_COUNT   (0xf << 4)

Definition at line 34 of file stmpe-keypad.c.

#define STMPE_KPC_DATA_BYTE0   0x68

Definition at line 26 of file stmpe-keypad.c.

#define STMPE_KPC_DATA_BYTE1   0x69

Definition at line 27 of file stmpe-keypad.c.

#define STMPE_KPC_DATA_BYTE2   0x6a

Definition at line 28 of file stmpe-keypad.c.

#define STMPE_KPC_DATA_BYTE3   0x6b

Definition at line 29 of file stmpe-keypad.c.

#define STMPE_KPC_DATA_BYTE4   0x6c

Definition at line 30 of file stmpe-keypad.c.

#define STMPE_KPC_DATA_COL   (0x7 << 0)

Definition at line 40 of file stmpe-keypad.c.

#define STMPE_KPC_DATA_NOKEY_MASK   0x78

Definition at line 41 of file stmpe-keypad.c.

#define STMPE_KPC_DATA_ROW   (0xf << 3)

Definition at line 39 of file stmpe-keypad.c.

#define STMPE_KPC_DATA_UP   (0x1 << 7)

Definition at line 38 of file stmpe-keypad.c.

#define STMPE_KPC_ROW_LSB   0x62

Definition at line 20 of file stmpe-keypad.c.

#define STMPE_KPC_ROW_MSB   0x61

Definition at line 19 of file stmpe-keypad.c.

#define STMPE_KPC_ROW_MSB_ROWS   0xff

Definition at line 36 of file stmpe-keypad.c.

Function Documentation

MODULE_AUTHOR ( "Rabin Vincent <[email protected]>"  )
MODULE_DESCRIPTION ( "STMPExxxx keypad driver )
MODULE_LICENSE ( "GPL v2 )
module_platform_driver ( stmpe_keypad_driver  )