aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/i2c-sensor.h36
-rw-r--r--include/linux/i2c.h8
2 files changed, 17 insertions, 27 deletions
diff --git a/include/linux/i2c-sensor.h b/include/linux/i2c-sensor.h
index 21b625204956..ae73b9e789cb 100644
--- a/include/linux/i2c-sensor.h
+++ b/include/linux/i2c-sensor.h
@@ -27,11 +27,10 @@
27 that place. If a specific chip is given, the module blindly assumes this 27 that place. If a specific chip is given, the module blindly assumes this
28 chip type is present; if a general force (kind == 0) is given, the module 28 chip type is present; if a general force (kind == 0) is given, the module
29 will still try to figure out what type of chip is present. This is useful 29 will still try to figure out what type of chip is present. This is useful
30 if for some reasons the detect for SMBus or ISA address space filled 30 if for some reasons the detect for SMBus address space filled fails.
31 fails. 31 probe: insmod parameter. Initialize this list with I2C_CLIENT_END values.
32 probe: insmod parameter. Initialize this list with I2C_CLIENT_ISA_END values. 32 A list of pairs. The first value is a bus number (ANY_I2C_BUS for any
33 A list of pairs. The first value is a bus number (ANY_I2C_ISA_BUS for 33 I2C bus), the second is the address.
34 the ISA bus, -1 for any I2C bus), the second is the address.
35 kind: The kind of chip. 0 equals any chip. 34 kind: The kind of chip. 0 equals any chip.
36*/ 35*/
37struct i2c_force_data { 36struct i2c_force_data {
@@ -40,25 +39,22 @@ struct i2c_force_data {
40}; 39};
41 40
42/* A structure containing the detect information. 41/* A structure containing the detect information.
43 normal_i2c: filled in by the module writer. Terminated by I2C_CLIENT_ISA_END. 42 normal_i2c: filled in by the module writer. Terminated by I2C_CLIENT_END.
44 A list of I2C addresses which should normally be examined. 43 A list of I2C addresses which should normally be examined.
45 normal_isa: filled in by the module writer. Terminated by SENSORS_ISA_END. 44 probe: insmod parameter. Initialize this list with I2C_CLIENT_END values.
46 A list of ISA addresses which should normally be examined. 45 A list of pairs. The first value is a bus number (ANY_I2C_BUS for any
47 probe: insmod parameter. Initialize this list with I2C_CLIENT_ISA_END values. 46 I2C bus), the second is the address. These addresses are also probed,
48 A list of pairs. The first value is a bus number (ANY_I2C_ISA_BUS for 47 as if they were in the 'normal' list.
49 the ISA bus, -1 for any I2C bus), the second is the address. These 48 ignore: insmod parameter. Initialize this list with I2C_CLIENT_END values.
50 addresses are also probed, as if they were in the 'normal' list. 49 A list of pairs. The first value is a bus number (ANY_I2C_BUS for any
51 ignore: insmod parameter. Initialize this list with I2C_CLIENT_ISA_END values. 50 I2C bus), the second is the I2C address. These addresses are never
52 A list of pairs. The first value is a bus number (ANY_I2C_ISA_BUS for 51 probed. This parameter overrules 'normal' and probe', but not the
53 the ISA bus, -1 for any I2C bus), the second is the I2C address. These 52 'force' lists.
54 addresses are never probed. This parameter overrules 'normal' and
55 'probe', but not the 'force' lists.
56 force_data: insmod parameters. A list, ending with an element of which 53 force_data: insmod parameters. A list, ending with an element of which
57 the force field is NULL. 54 the force field is NULL.
58*/ 55*/
59struct i2c_address_data { 56struct i2c_address_data {
60 unsigned short *normal_i2c; 57 unsigned short *normal_i2c;
61 unsigned int *normal_isa;
62 unsigned short *probe; 58 unsigned short *probe;
63 unsigned short *ignore; 59 unsigned short *ignore;
64 struct i2c_force_data *forces; 60 struct i2c_force_data *forces;
@@ -78,7 +74,6 @@ struct i2c_address_data {
78 "List of adapter,address pairs not to scan"); \ 74 "List of adapter,address pairs not to scan"); \
79 static struct i2c_address_data addr_data = { \ 75 static struct i2c_address_data addr_data = { \
80 .normal_i2c = normal_i2c, \ 76 .normal_i2c = normal_i2c, \
81 .normal_isa = normal_isa, \
82 .probe = probe, \ 77 .probe = probe, \
83 .ignore = ignore, \ 78 .ignore = ignore, \
84 .forces = forces, \ 79 .forces = forces, \
@@ -242,8 +237,7 @@ struct i2c_address_data {
242 237
243/* Detect function. It iterates over all possible addresses itself. For 238/* Detect function. It iterates over all possible addresses itself. For
244 SMBus addresses, it will only call found_proc if some client is connected 239 SMBus addresses, it will only call found_proc if some client is connected
245 to the SMBus (unless a 'force' matched); for ISA detections, this is not 240 to the SMBus (unless a 'force' matched). */
246 done. */
247extern int i2c_detect(struct i2c_adapter *adapter, 241extern int i2c_detect(struct i2c_adapter *adapter,
248 struct i2c_address_data *address_data, 242 struct i2c_address_data *address_data,
249 int (*found_proc) (struct i2c_adapter *, int, int)); 243 int (*found_proc) (struct i2c_adapter *, int, int));
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 3be06105034c..39ff363eadec 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -150,12 +150,9 @@ struct i2c_driver {
150 */ 150 */
151struct i2c_client { 151struct i2c_client {
152 unsigned int flags; /* div., see below */ 152 unsigned int flags; /* div., see below */
153 unsigned int addr; /* chip address - NOTE: 7bit */ 153 unsigned short addr; /* chip address - NOTE: 7bit */
154 /* addresses are stored in the */ 154 /* addresses are stored in the */
155 /* _LOWER_ 7 bits of this char */ 155 /* _LOWER_ 7 bits */
156 /* addr: unsigned int to make lm_sensors i2c-isa adapter work
157 more cleanly. It does not take any more memory space, due to
158 alignment considerations */
159 struct i2c_adapter *adapter; /* the adapter we sit on */ 156 struct i2c_adapter *adapter; /* the adapter we sit on */
160 struct i2c_driver *driver; /* and our access routines */ 157 struct i2c_driver *driver; /* and our access routines */
161 int usage_count; /* How many accesses currently */ 158 int usage_count; /* How many accesses currently */
@@ -309,7 +306,6 @@ struct i2c_client_address_data {
309 306
310/* Internal numbers to terminate lists */ 307/* Internal numbers to terminate lists */
311#define I2C_CLIENT_END 0xfffeU 308#define I2C_CLIENT_END 0xfffeU
312#define I2C_CLIENT_ISA_END 0xfffefffeU
313 309
314/* The numbers to use to set I2C bus address */ 310/* The numbers to use to set I2C bus address */
315#define ANY_I2C_BUS 0xffff 311#define ANY_I2C_BUS 0xffff