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

Go to the source code of this file.

Data Structures

struct  pca953x_chip
 

Macros

#define PCA953X_INPUT   0
 
#define PCA953X_OUTPUT   1
 
#define PCA953X_INVERT   2
 
#define PCA953X_DIRECTION   3
 
#define REG_ADDR_AI   0x80
 
#define PCA957X_IN   0
 
#define PCA957X_INVRT   1
 
#define PCA957X_BKEN   2
 
#define PCA957X_PUPD   3
 
#define PCA957X_CFG   4
 
#define PCA957X_OUT   5
 
#define PCA957X_MSK   6
 
#define PCA957X_INTS   7
 
#define PCA_GPIO_MASK   0x00FF
 
#define PCA_INT   0x0100
 
#define PCA953X_TYPE   0x1000
 
#define PCA957X_TYPE   0x2000
 

Functions

 MODULE_DEVICE_TABLE (i2c, pca953x_id)
 
 subsys_initcall (pca953x_init)
 
 module_exit (pca953x_exit)
 
 MODULE_AUTHOR ("eric miao <[email protected]>")
 
 MODULE_DESCRIPTION ("GPIO expander driver for PCA953x")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define PCA953X_DIRECTION   3

Definition at line 29 of file gpio-pca953x.c.

#define PCA953X_INPUT   0

Definition at line 26 of file gpio-pca953x.c.

#define PCA953X_INVERT   2

Definition at line 28 of file gpio-pca953x.c.

#define PCA953X_OUTPUT   1

Definition at line 27 of file gpio-pca953x.c.

#define PCA953X_TYPE   0x1000

Definition at line 44 of file gpio-pca953x.c.

#define PCA957X_BKEN   2

Definition at line 35 of file gpio-pca953x.c.

#define PCA957X_CFG   4

Definition at line 37 of file gpio-pca953x.c.

#define PCA957X_IN   0

Definition at line 33 of file gpio-pca953x.c.

#define PCA957X_INTS   7

Definition at line 40 of file gpio-pca953x.c.

#define PCA957X_INVRT   1

Definition at line 34 of file gpio-pca953x.c.

#define PCA957X_MSK   6

Definition at line 39 of file gpio-pca953x.c.

#define PCA957X_OUT   5

Definition at line 38 of file gpio-pca953x.c.

#define PCA957X_PUPD   3

Definition at line 36 of file gpio-pca953x.c.

#define PCA957X_TYPE   0x2000

Definition at line 45 of file gpio-pca953x.c.

#define PCA_GPIO_MASK   0x00FF

Definition at line 42 of file gpio-pca953x.c.

#define PCA_INT   0x0100

Definition at line 43 of file gpio-pca953x.c.

#define REG_ADDR_AI   0x80

Definition at line 31 of file gpio-pca953x.c.

Function Documentation

MODULE_AUTHOR ( "eric miao <[email protected]>"  )
MODULE_DESCRIPTION ( "GPIO expander driver for PCA953x"  )
MODULE_DEVICE_TABLE ( i2c  ,
pca953x_id   
)
module_exit ( pca953x_exit  )
MODULE_LICENSE ( "GPL"  )
subsys_initcall ( pca953x_init  )