Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
lpc32xx-keys.c File Reference
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/slab.h>
#include <linux/irq.h>
#include <linux/pm.h>
#include <linux/platform_device.h>
#include <linux/input.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/input/matrix_keypad.h>

Go to the source code of this file.

Data Structures

struct  lpc32xx_kscan_drv
 

Macros

#define DRV_NAME   "lpc32xx_keys"
 
#define LPC32XX_KS_DEB(x)   ((x) + 0x00)
 
#define LPC32XX_KS_STATE_COND(x)   ((x) + 0x04)
 
#define LPC32XX_KS_IRQ(x)   ((x) + 0x08)
 
#define LPC32XX_KS_SCAN_CTL(x)   ((x) + 0x0C)
 
#define LPC32XX_KS_FAST_TST(x)   ((x) + 0x10)
 
#define LPC32XX_KS_MATRIX_DIM(x)   ((x) + 0x14) /* 1..8 */
 
#define LPC32XX_KS_DATA(x, y)   ((x) + 0x40 + ((y) << 2))
 
#define LPC32XX_KSCAN_DEB_NUM_DEB_PASS(n)   ((n) & 0xFF)
 
#define LPC32XX_KSCAN_SCOND_IN_IDLE   0x0
 
#define LPC32XX_KSCAN_SCOND_IN_SCANONCE   0x1
 
#define LPC32XX_KSCAN_SCOND_IN_IRQGEN   0x2
 
#define LPC32XX_KSCAN_SCOND_IN_SCAN_MATRIX   0x3
 
#define LPC32XX_KSCAN_IRQ_PENDING_CLR   0x1
 
#define LPC32XX_KSCAN_SCTRL_SCAN_DELAY(n)   ((n) & 0xFF)
 
#define LPC32XX_KSCAN_FTST_FORCESCANONCE   0x1
 
#define LPC32XX_KSCAN_FTST_USE32K_CLK   0x2
 
#define LPC32XX_KSCAN_MSEL_SELECT(n)   ((n) & 0xF)
 

Functions

 MODULE_DEVICE_TABLE (of, lpc32xx_kscan_match)
 
 module_platform_driver (lpc32xx_kscan_driver)
 
 MODULE_LICENSE ("GPL")
 
 MODULE_AUTHOR ("Kevin Wells <[email protected]>")
 
 MODULE_AUTHOR ("Roland Stigge <[email protected]>")
 
 MODULE_DESCRIPTION ("Key scanner driver for LPC32XX devices")
 

Macro Definition Documentation

#define DRV_NAME   "lpc32xx_keys"

Definition at line 37 of file lpc32xx-keys.c.

#define LPC32XX_KS_DATA (   x,
  y 
)    ((x) + 0x40 + ((y) << 2))

Definition at line 48 of file lpc32xx-keys.c.

#define LPC32XX_KS_DEB (   x)    ((x) + 0x00)

Definition at line 42 of file lpc32xx-keys.c.

#define LPC32XX_KS_FAST_TST (   x)    ((x) + 0x10)

Definition at line 46 of file lpc32xx-keys.c.

#define LPC32XX_KS_IRQ (   x)    ((x) + 0x08)

Definition at line 44 of file lpc32xx-keys.c.

#define LPC32XX_KS_MATRIX_DIM (   x)    ((x) + 0x14) /* 1..8 */

Definition at line 47 of file lpc32xx-keys.c.

#define LPC32XX_KS_SCAN_CTL (   x)    ((x) + 0x0C)

Definition at line 45 of file lpc32xx-keys.c.

#define LPC32XX_KS_STATE_COND (   x)    ((x) + 0x04)

Definition at line 43 of file lpc32xx-keys.c.

#define LPC32XX_KSCAN_DEB_NUM_DEB_PASS (   n)    ((n) & 0xFF)

Definition at line 50 of file lpc32xx-keys.c.

#define LPC32XX_KSCAN_FTST_FORCESCANONCE   0x1

Definition at line 61 of file lpc32xx-keys.c.

#define LPC32XX_KSCAN_FTST_USE32K_CLK   0x2

Definition at line 62 of file lpc32xx-keys.c.

#define LPC32XX_KSCAN_IRQ_PENDING_CLR   0x1

Definition at line 57 of file lpc32xx-keys.c.

#define LPC32XX_KSCAN_MSEL_SELECT (   n)    ((n) & 0xF)

Definition at line 64 of file lpc32xx-keys.c.

#define LPC32XX_KSCAN_SCOND_IN_IDLE   0x0

Definition at line 52 of file lpc32xx-keys.c.

#define LPC32XX_KSCAN_SCOND_IN_IRQGEN   0x2

Definition at line 54 of file lpc32xx-keys.c.

#define LPC32XX_KSCAN_SCOND_IN_SCAN_MATRIX   0x3

Definition at line 55 of file lpc32xx-keys.c.

#define LPC32XX_KSCAN_SCOND_IN_SCANONCE   0x1

Definition at line 53 of file lpc32xx-keys.c.

#define LPC32XX_KSCAN_SCTRL_SCAN_DELAY (   n)    ((n) & 0xFF)

Definition at line 59 of file lpc32xx-keys.c.

Function Documentation

MODULE_AUTHOR ( "Kevin Wells <[email protected]>"  )
MODULE_AUTHOR ( "Roland Stigge <[email protected]>"  )
MODULE_DESCRIPTION ( "Key scanner driver for LPC32XX devices )
MODULE_DEVICE_TABLE ( of  ,
lpc32xx_kscan_match   
)
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( lpc32xx_kscan_driver  )