Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
i2c-algo-pca.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/delay.h>
#include <linux/jiffies.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-pca.h>

Go to the source code of this file.

Macros

#define DEB1(fmt, args...)
 
#define DEB2(fmt, args...)
 
#define DEB3(fmt, args...)
 
#define pca_outw(adap, reg, val)   adap->write_byte(adap->data, reg, val)
 
#define pca_inw(adap, reg)   adap->read_byte(adap->data, reg)
 
#define pca_status(adap)   pca_inw(adap, I2C_PCA_STA)
 
#define pca_clock(adap)   adap->i2c_clock
 
#define pca_set_con(adap, val)   pca_outw(adap, I2C_PCA_CON, val)
 
#define pca_get_con(adap)   pca_inw(adap, I2C_PCA_CON)
 
#define pca_wait(adap)   adap->wait_for_completion(adap->data)
 

Functions

int i2c_pca_add_bus (struct i2c_adapter *adap)
 
 EXPORT_SYMBOL (i2c_pca_add_bus)
 
int i2c_pca_add_numbered_bus (struct i2c_adapter *adap)
 
 EXPORT_SYMBOL (i2c_pca_add_numbered_bus)
 
 MODULE_AUTHOR ("Ian Campbell <[email protected]>, ""Wolfram Sang <[email protected]>")
 
 MODULE_DESCRIPTION ("I2C-Bus PCA9564/PCA9665 algorithm")
 
 MODULE_LICENSE ("GPL")
 
 module_param (i2c_debug, int, 0)
 

Macro Definition Documentation

#define DEB1 (   fmt,
  args... 
)
Value:
do { if (i2c_debug >= 1) \
printk(KERN_DEBUG fmt, ## args); } while (0)

Definition at line 32 of file i2c-algo-pca.c.

#define DEB2 (   fmt,
  args... 
)
Value:
do { if (i2c_debug >= 2) \
printk(KERN_DEBUG fmt, ## args); } while (0)

Definition at line 34 of file i2c-algo-pca.c.

#define DEB3 (   fmt,
  args... 
)
Value:
do { if (i2c_debug >= 3) \
printk(KERN_DEBUG fmt, ## args); } while (0)

Definition at line 36 of file i2c-algo-pca.c.

#define pca_clock (   adap)    adap->i2c_clock

Definition at line 45 of file i2c-algo-pca.c.

#define pca_get_con (   adap)    pca_inw(adap, I2C_PCA_CON)

Definition at line 47 of file i2c-algo-pca.c.

#define pca_inw (   adap,
  reg 
)    adap->read_byte(adap->data, reg)

Definition at line 42 of file i2c-algo-pca.c.

#define pca_outw (   adap,
  reg,
  val 
)    adap->write_byte(adap->data, reg, val)

Definition at line 41 of file i2c-algo-pca.c.

#define pca_set_con (   adap,
  val 
)    pca_outw(adap, I2C_PCA_CON, val)

Definition at line 46 of file i2c-algo-pca.c.

#define pca_status (   adap)    pca_inw(adap, I2C_PCA_STA)

Definition at line 44 of file i2c-algo-pca.c.

#define pca_wait (   adap)    adap->wait_for_completion(adap->data)

Definition at line 48 of file i2c-algo-pca.c.

Function Documentation

EXPORT_SYMBOL ( i2c_pca_add_bus  )
EXPORT_SYMBOL ( i2c_pca_add_numbered_bus  )
int i2c_pca_add_bus ( struct i2c_adapter adap)

Definition at line 538 of file i2c-algo-pca.c.

int i2c_pca_add_numbered_bus ( struct i2c_adapter adap)

Definition at line 550 of file i2c-algo-pca.c.

MODULE_AUTHOR ( "Ian Campbell <[email protected] ,
""Wolfram Sang< w.sang @pengutronix.de >"   
)
MODULE_DESCRIPTION ( "I2C-Bus PCA9564/PCA9665 algorithm )
MODULE_LICENSE ( "GPL"  )
module_param ( i2c_debug  ,
int  ,
 
)