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

Go to the source code of this file.

Data Structures

struct  lm8333
 

Macros

#define LM8333_FIFO_READ   0x20
 
#define LM8333_DEBOUNCE   0x22
 
#define LM8333_READ_INT   0xD0
 
#define LM8333_ACTIVE   0xE4
 
#define LM8333_READ_ERROR   0xF0
 
#define LM8333_KEYPAD_IRQ   (1 << 0)
 
#define LM8333_ERROR_IRQ   (1 << 3)
 
#define LM8333_ERROR_KEYOVR   0x04
 
#define LM8333_ERROR_FIFOOVR   0x40
 
#define LM8333_FIFO_TRANSFER_SIZE   16
 
#define LM8333_NUM_ROWS   8
 
#define LM8333_NUM_COLS   16
 
#define LM8333_ROW_SHIFT   4
 
#define LM8333_READ_RETRIES   2
 

Functions

int lm8333_read8 (struct lm8333 *lm8333, u8 cmd)
 
int lm8333_write8 (struct lm8333 *lm8333, u8 cmd, u8 val)
 
int lm8333_read_block (struct lm8333 *lm8333, u8 cmd, u8 len, u8 *buf)
 
 MODULE_DEVICE_TABLE (i2c, lm8333_id)
 
 module_i2c_driver (lm8333_driver)
 
 MODULE_AUTHOR ("Wolfram Sang <[email protected]>")
 
 MODULE_DESCRIPTION ("LM8333 keyboard driver")
 
 MODULE_LICENSE ("GPL v2")
 

Macro Definition Documentation

#define LM8333_ACTIVE   0xE4

Definition at line 21 of file lm8333.c.

#define LM8333_DEBOUNCE   0x22

Definition at line 19 of file lm8333.c.

#define LM8333_ERROR_FIFOOVR   0x40

Definition at line 28 of file lm8333.c.

#define LM8333_ERROR_IRQ   (1 << 3)

Definition at line 25 of file lm8333.c.

#define LM8333_ERROR_KEYOVR   0x04

Definition at line 27 of file lm8333.c.

#define LM8333_FIFO_READ   0x20

Definition at line 18 of file lm8333.c.

#define LM8333_FIFO_TRANSFER_SIZE   16

Definition at line 30 of file lm8333.c.

#define LM8333_KEYPAD_IRQ   (1 << 0)

Definition at line 24 of file lm8333.c.

#define LM8333_NUM_COLS   16

Definition at line 33 of file lm8333.c.

#define LM8333_NUM_ROWS   8

Definition at line 32 of file lm8333.c.

#define LM8333_READ_ERROR   0xF0

Definition at line 22 of file lm8333.c.

#define LM8333_READ_INT   0xD0

Definition at line 20 of file lm8333.c.

#define LM8333_READ_RETRIES   2

Definition at line 43 of file lm8333.c.

#define LM8333_ROW_SHIFT   4

Definition at line 34 of file lm8333.c.

Function Documentation

int lm8333_read8 ( struct lm8333 lm8333,
u8  cmd 
)

Definition at line 45 of file lm8333.c.

int lm8333_read_block ( struct lm8333 lm8333,
u8  cmd,
u8  len,
u8 buf 
)

Definition at line 67 of file lm8333.c.

int lm8333_write8 ( struct lm8333 lm8333,
u8  cmd,
u8  val 
)

Definition at line 56 of file lm8333.c.

MODULE_AUTHOR ( "Wolfram Sang <[email protected]>"  )
MODULE_DESCRIPTION ( "LM8333 keyboard driver )
MODULE_DEVICE_TABLE ( i2c  ,
lm8333_id   
)
module_i2c_driver ( lm8333_driver  )
MODULE_LICENSE ( "GPL v2 )