|
Linux Kernel
3.7.1
|
#include <linux/module.h>#include <linux/init.h>#include <linux/jiffies.h>#include <linux/delay.h>#include <linux/slab.h>#include <linux/device.h>#include <linux/i2c.h>#include <linux/i2c-mux.h>#include <linux/i2c/pca954x.h>Go to the source code of this file.
Data Structures | |
| struct | pca9541 |
Macros | |
| #define | PCA9541_CONTROL 0x01 |
| #define | PCA9541_ISTAT 0x02 |
| #define | PCA9541_CTL_MYBUS (1 << 0) |
| #define | PCA9541_CTL_NMYBUS (1 << 1) |
| #define | PCA9541_CTL_BUSON (1 << 2) |
| #define | PCA9541_CTL_NBUSON (1 << 3) |
| #define | PCA9541_CTL_BUSINIT (1 << 4) |
| #define | PCA9541_CTL_TESTON (1 << 6) |
| #define | PCA9541_CTL_NTESTON (1 << 7) |
| #define | PCA9541_ISTAT_INTIN (1 << 0) |
| #define | PCA9541_ISTAT_BUSINIT (1 << 1) |
| #define | PCA9541_ISTAT_BUSOK (1 << 2) |
| #define | PCA9541_ISTAT_BUSLOST (1 << 3) |
| #define | PCA9541_ISTAT_MYTEST (1 << 6) |
| #define | PCA9541_ISTAT_NMYTEST (1 << 7) |
| #define | BUSON (PCA9541_CTL_BUSON | PCA9541_CTL_NBUSON) |
| #define | MYBUS (PCA9541_CTL_MYBUS | PCA9541_CTL_NMYBUS) |
| #define | mybus(x) (!((x) & MYBUS) || ((x) & MYBUS) == MYBUS) |
| #define | busoff(x) (!((x) & BUSON) || ((x) & BUSON) == BUSON) |
| #define | ARB_TIMEOUT (HZ / 8) /* 125 ms until forcing bus ownership */ |
| #define | ARB2_TIMEOUT (HZ / 4) /* 250 ms until acquisition failure */ |
| #define | SELECT_DELAY_SHORT 50 |
| #define | SELECT_DELAY_LONG 1000 |
Functions | |
| MODULE_DEVICE_TABLE (i2c, pca9541_id) | |
| module_i2c_driver (pca9541_driver) | |
| MODULE_AUTHOR ("Guenter Roeck <[email protected]>") | |
| MODULE_DESCRIPTION ("PCA9541 I2C master selector driver") | |
| MODULE_LICENSE ("GPL v2") | |
Definition at line 70 of file i2c-mux-pca9541.c.
Definition at line 69 of file i2c-mux-pca9541.c.
Definition at line 66 of file i2c-mux-pca9541.c.
| #define BUSON (PCA9541_CTL_BUSON | PCA9541_CTL_NBUSON) |
Definition at line 63 of file i2c-mux-pca9541.c.
| #define MYBUS (PCA9541_CTL_MYBUS | PCA9541_CTL_NMYBUS) |
Definition at line 64 of file i2c-mux-pca9541.c.
Definition at line 65 of file i2c-mux-pca9541.c.
| #define PCA9541_CONTROL 0x01 |
Definition at line 45 of file i2c-mux-pca9541.c.
| #define PCA9541_CTL_BUSINIT (1 << 4) |
Definition at line 52 of file i2c-mux-pca9541.c.
| #define PCA9541_CTL_BUSON (1 << 2) |
Definition at line 50 of file i2c-mux-pca9541.c.
| #define PCA9541_CTL_MYBUS (1 << 0) |
Definition at line 48 of file i2c-mux-pca9541.c.
| #define PCA9541_CTL_NBUSON (1 << 3) |
Definition at line 51 of file i2c-mux-pca9541.c.
| #define PCA9541_CTL_NMYBUS (1 << 1) |
Definition at line 49 of file i2c-mux-pca9541.c.
| #define PCA9541_CTL_NTESTON (1 << 7) |
Definition at line 54 of file i2c-mux-pca9541.c.
| #define PCA9541_CTL_TESTON (1 << 6) |
Definition at line 53 of file i2c-mux-pca9541.c.
| #define PCA9541_ISTAT 0x02 |
Definition at line 46 of file i2c-mux-pca9541.c.
| #define PCA9541_ISTAT_BUSINIT (1 << 1) |
Definition at line 57 of file i2c-mux-pca9541.c.
| #define PCA9541_ISTAT_BUSLOST (1 << 3) |
Definition at line 59 of file i2c-mux-pca9541.c.
| #define PCA9541_ISTAT_BUSOK (1 << 2) |
Definition at line 58 of file i2c-mux-pca9541.c.
| #define PCA9541_ISTAT_INTIN (1 << 0) |
Definition at line 56 of file i2c-mux-pca9541.c.
| #define PCA9541_ISTAT_MYTEST (1 << 6) |
Definition at line 60 of file i2c-mux-pca9541.c.
| #define PCA9541_ISTAT_NMYTEST (1 << 7) |
Definition at line 61 of file i2c-mux-pca9541.c.
| #define SELECT_DELAY_LONG 1000 |
Definition at line 74 of file i2c-mux-pca9541.c.
| #define SELECT_DELAY_SHORT 50 |
Definition at line 73 of file i2c-mux-pca9541.c.
| MODULE_AUTHOR | ( | "Guenter Roeck <[email protected]>" | ) |
| MODULE_DEVICE_TABLE | ( | i2c | , |
| pca9541_id | |||
| ) |
| module_i2c_driver | ( | pca9541_driver | ) |
| MODULE_LICENSE | ( | "GPL v2" | ) |
1.8.2