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

Go to the source code of this file.

Data Structures

struct  tc_keypad
 

Macros

#define TC3589x_MAX_KPROW   8
 
#define TC3589x_MAX_KPCOL   12
 
#define TC3589x_MAX_DEBOUNCE_SETTLE   0xFF
 
#define DEDICATED_KEY_VAL   0xFF
 
#define TC3589x_NO_PULL_MASK   0x0
 
#define TC3589x_PULL_DOWN_MASK   0x1
 
#define TC3589x_PULL_UP_MASK   0x2
 
#define TC3589x_PULLUP_ALL_MASK   0xAA
 
#define TC3589x_IO_PULL_VAL(index, mask)   ((mask)<<((index)%4)*2))
 
#define IOCFG_BALLCFG   0x01
 
#define IOCFG_IG   0x08
 
#define KP_EVCODE_COL_MASK   0x0F
 
#define KP_EVCODE_ROW_MASK   0x70
 
#define KP_RELEASE_EVT_MASK   0x80
 
#define KP_ROW_SHIFT   4
 
#define KP_NO_VALID_KEY_MASK   0x7F
 
#define TC3589x_KBDRST   0x2
 
#define TC3589x_IRQRST   0x10
 
#define TC3589x_RESET_ALL   0x1B
 
#define TC3589x_KBDMFS_EN   0x1
 
#define KPD_CLK_EN   0x1
 
#define IRQ_CLEAR   0x1
 
#define TC3589x_EVT_LOSS_INT   0x8
 
#define TC3589x_EVT_INT   0x4
 
#define TC3589x_KBD_LOSS_INT   0x2
 
#define TC3589x_KBD_INT   0x1
 
#define TC3589x_EVT_INT_CLR   0x2
 
#define TC3589x_KBD_INT_CLR   0x1
 
#define TC3589x_KBD_KEYMAP_SIZE   64
 
#define TC35893_DATA_REGS   4
 
#define TC35893_KEYCODE_FIFO_EMPTY   0x7f
 
#define TC35893_KEYCODE_FIFO_CLEAR   0xff
 
#define TC35893_KEYPAD_ROW_SHIFT   0x3
 

Functions

 module_platform_driver (tc3589x_keypad_driver)
 
 MODULE_LICENSE ("GPL v2")
 
 MODULE_AUTHOR ("Jayeeta Banerjee/Sundar Iyer")
 
 MODULE_DESCRIPTION ("TC35893 Keypad Driver")
 
 MODULE_ALIAS ("platform:tc3589x-keypad")
 

Macro Definition Documentation

#define DEDICATED_KEY_VAL   0xFF

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

#define IOCFG_BALLCFG   0x01

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

#define IOCFG_IG   0x08

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

#define IRQ_CLEAR   0x1

Definition at line 61 of file tc3589x-keypad.c.

#define KP_EVCODE_COL_MASK   0x0F

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

#define KP_EVCODE_ROW_MASK   0x70

Definition at line 42 of file tc3589x-keypad.c.

#define KP_NO_VALID_KEY_MASK   0x7F

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

#define KP_RELEASE_EVT_MASK   0x80

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

#define KP_ROW_SHIFT   4

Definition at line 45 of file tc3589x-keypad.c.

#define KPD_CLK_EN   0x1

Definition at line 58 of file tc3589x-keypad.c.

#define TC35893_DATA_REGS   4

Definition at line 165 of file tc3589x-keypad.c.

#define TC35893_KEYCODE_FIFO_CLEAR   0xff

Definition at line 167 of file tc3589x-keypad.c.

#define TC35893_KEYCODE_FIFO_EMPTY   0x7f

Definition at line 166 of file tc3589x-keypad.c.

#define TC35893_KEYPAD_ROW_SHIFT   0x3

Definition at line 168 of file tc3589x-keypad.c.

#define TC3589x_EVT_INT   0x4

Definition at line 65 of file tc3589x-keypad.c.

#define TC3589x_EVT_INT_CLR   0x2

Definition at line 70 of file tc3589x-keypad.c.

#define TC3589x_EVT_LOSS_INT   0x8

Definition at line 64 of file tc3589x-keypad.c.

#define TC3589x_IO_PULL_VAL (   index,
  mask 
)    ((mask)<<((index)%4)*2))

Definition at line 35 of file tc3589x-keypad.c.

#define TC3589x_IRQRST   0x10

Definition at line 51 of file tc3589x-keypad.c.

#define TC3589x_KBD_INT   0x1

Definition at line 67 of file tc3589x-keypad.c.

#define TC3589x_KBD_INT_CLR   0x1

Definition at line 71 of file tc3589x-keypad.c.

#define TC3589x_KBD_KEYMAP_SIZE   64

Definition at line 73 of file tc3589x-keypad.c.

#define TC3589x_KBD_LOSS_INT   0x2

Definition at line 66 of file tc3589x-keypad.c.

#define TC3589x_KBDMFS_EN   0x1

Definition at line 55 of file tc3589x-keypad.c.

#define TC3589x_KBDRST   0x2

Definition at line 50 of file tc3589x-keypad.c.

#define TC3589x_MAX_DEBOUNCE_SETTLE   0xFF

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

#define TC3589x_MAX_KPCOL   12

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

#define TC3589x_MAX_KPROW   8

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

#define TC3589x_NO_PULL_MASK   0x0

Definition at line 31 of file tc3589x-keypad.c.

#define TC3589x_PULL_DOWN_MASK   0x1

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

#define TC3589x_PULL_UP_MASK   0x2

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

#define TC3589x_PULLUP_ALL_MASK   0xAA

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

#define TC3589x_RESET_ALL   0x1B

Definition at line 52 of file tc3589x-keypad.c.

Function Documentation

MODULE_ALIAS ( "platform:tc3589x-keypad"  )
MODULE_AUTHOR ( "Jayeeta Banerjee/Sundar Iyer"  )
MODULE_DESCRIPTION ( "TC35893 Keypad Driver"  )
MODULE_LICENSE ( "GPL v2 )
module_platform_driver ( tc3589x_keypad_driver  )