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

Go to the source code of this file.

Macros

#define DEB2(x)   if (i2c_debug >= 2) x
 
#define DEB3(x)   if (i2c_debug >= 3) x /* print several statistical values */
 
#define DEBPROTO(x)   if (i2c_debug >= 9) x;
 
#define DEF_TIMEOUT   16
 
#define set_pcf(adap, ctl, val)   adap->setpcf(adap->data, ctl, val)
 
#define get_pcf(adap, ctl)   adap->getpcf(adap->data, ctl)
 
#define get_own(adap)   adap->getown(adap->data)
 
#define get_clock(adap)   adap->getclock(adap->data)
 
#define i2c_outb(adap, val)   adap->setpcf(adap->data, 0, val)
 
#define i2c_inb(adap)   adap->getpcf(adap->data, 0)
 

Functions

int i2c_pcf_add_bus (struct i2c_adapter *adap)
 
 EXPORT_SYMBOL (i2c_pcf_add_bus)
 
 MODULE_AUTHOR ("Hans Berglund <hb@spacetec.no>")
 
 MODULE_DESCRIPTION ("I2C-Bus PCF8584 algorithm")
 
 MODULE_LICENSE ("GPL")
 
 module_param (i2c_debug, int, S_IRUGO|S_IWUSR)
 
 MODULE_PARM_DESC (i2c_debug,"debug level - 0 off; 1 normal; 2,3 more verbose; 9 pcf-protocol")
 

Macro Definition Documentation

#define DEB2 (   x)    if (i2c_debug >= 2) x

Definition at line 40 of file i2c-algo-pcf.c.

#define DEB3 (   x)    if (i2c_debug >= 3) x /* print several statistical values */

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

#define DEBPROTO (   x)    if (i2c_debug >= 9) x;

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

#define DEF_TIMEOUT   16

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

#define get_clock (   adap)    adap->getclock(adap->data)

Definition at line 56 of file i2c-algo-pcf.c.

#define get_own (   adap)    adap->getown(adap->data)

Definition at line 55 of file i2c-algo-pcf.c.

#define get_pcf (   adap,
  ctl 
)    adap->getpcf(adap->data, ctl)

Definition at line 54 of file i2c-algo-pcf.c.

#define i2c_inb (   adap)    adap->getpcf(adap->data, 0)

Definition at line 58 of file i2c-algo-pcf.c.

#define i2c_outb (   adap,
  val 
)    adap->setpcf(adap->data, 0, val)

Definition at line 57 of file i2c-algo-pcf.c.

#define set_pcf (   adap,
  ctl,
  val 
)    adap->setpcf(adap->data, ctl, val)

Definition at line 53 of file i2c-algo-pcf.c.

Function Documentation

EXPORT_SYMBOL ( i2c_pcf_add_bus  )
int i2c_pcf_add_bus ( struct i2c_adapter adap)

Definition at line 417 of file i2c-algo-pcf.c.

MODULE_AUTHOR ( "Hans Berglund <hb@spacetec.no>"  )
MODULE_DESCRIPTION ( "I2C-Bus PCF8584 algorithm )
MODULE_LICENSE ( "GPL"  )
module_param ( i2c_debug  ,
int  ,
S_IRUGO S_IWUSR 
)
MODULE_PARM_DESC ( i2c_debug  ,
"debug level - 0 off; 1 normal;  2,
3 more verbose;9 pcf-protocol  
)