diff options
-rw-r--r-- | drivers/i2c/i2c-sensor-detect.c | 2 | ||||
-rw-r--r-- | include/linux/i2c-sensor.h | 30 |
2 files changed, 4 insertions, 28 deletions
diff --git a/drivers/i2c/i2c-sensor-detect.c b/drivers/i2c/i2c-sensor-detect.c index c952926c1482..70fcf7281988 100644 --- a/drivers/i2c/i2c-sensor-detect.c +++ b/drivers/i2c/i2c-sensor-detect.c | |||
@@ -28,7 +28,7 @@ static unsigned short empty[] = {I2C_CLIENT_END}; | |||
28 | 28 | ||
29 | /* Won't work for 10-bit addresses! */ | 29 | /* Won't work for 10-bit addresses! */ |
30 | int i2c_detect(struct i2c_adapter *adapter, | 30 | int i2c_detect(struct i2c_adapter *adapter, |
31 | struct i2c_address_data *address_data, | 31 | struct i2c_client_address_data *address_data, |
32 | int (*found_proc) (struct i2c_adapter *, int, int)) | 32 | int (*found_proc) (struct i2c_adapter *, int, int)) |
33 | { | 33 | { |
34 | int addr, i, found, j, err; | 34 | int addr, i, found, j, err; |
diff --git a/include/linux/i2c-sensor.h b/include/linux/i2c-sensor.h index 4facaa0b9054..fc9284af9fae 100644 --- a/include/linux/i2c-sensor.h +++ b/include/linux/i2c-sensor.h | |||
@@ -22,31 +22,7 @@ | |||
22 | #ifndef _LINUX_I2C_SENSOR_H | 22 | #ifndef _LINUX_I2C_SENSOR_H |
23 | #define _LINUX_I2C_SENSOR_H | 23 | #define _LINUX_I2C_SENSOR_H |
24 | 24 | ||
25 | /* A structure containing the detect information. | 25 | #include <linux/i2c.h> |
26 | normal_i2c: filled in by the module writer. Terminated by I2C_CLIENT_END. | ||
27 | A list of I2C addresses which should normally be examined. | ||
28 | probe: insmod parameter. Initialize this list with I2C_CLIENT_END values. | ||
29 | A list of pairs. The first value is a bus number (ANY_I2C_BUS for any | ||
30 | I2C bus), the second is the address. These addresses are also probed, | ||
31 | as if they were in the 'normal' list. | ||
32 | ignore: insmod parameter. Initialize this list with I2C_CLIENT_END values. | ||
33 | A list of pairs. The first value is a bus number (ANY_I2C_BUS for any | ||
34 | I2C bus), the second is the I2C address. These addresses are never | ||
35 | probed. This parameter overrules 'normal' and probe', but not the | ||
36 | 'force' lists. | ||
37 | forces: insmod parameters. A list, ending with a NULL element. | ||
38 | Force variables overrule all other variables; they force a detection on | ||
39 | that place. If a specific chip is given, the module blindly assumes this | ||
40 | chip type is present; if a general force (kind == 0) is given, the module | ||
41 | will still try to figure out what type of chip is present. This is useful | ||
42 | if for some reasons the detect for SMBus address space filled fails. | ||
43 | */ | ||
44 | struct i2c_address_data { | ||
45 | unsigned short *normal_i2c; | ||
46 | unsigned short *probe; | ||
47 | unsigned short *ignore; | ||
48 | unsigned short **forces; | ||
49 | }; | ||
50 | 26 | ||
51 | #define SENSORS_MODULE_PARM_FORCE(name) \ | 27 | #define SENSORS_MODULE_PARM_FORCE(name) \ |
52 | I2C_CLIENT_MODULE_PARM(force_ ## name, \ | 28 | I2C_CLIENT_MODULE_PARM(force_ ## name, \ |
@@ -60,7 +36,7 @@ struct i2c_address_data { | |||
60 | "List of adapter,address pairs to scan additionally"); \ | 36 | "List of adapter,address pairs to scan additionally"); \ |
61 | I2C_CLIENT_MODULE_PARM(ignore, \ | 37 | I2C_CLIENT_MODULE_PARM(ignore, \ |
62 | "List of adapter,address pairs not to scan"); \ | 38 | "List of adapter,address pairs not to scan"); \ |
63 | static struct i2c_address_data addr_data = { \ | 39 | static struct i2c_client_address_data addr_data = { \ |
64 | .normal_i2c = normal_i2c, \ | 40 | .normal_i2c = normal_i2c, \ |
65 | .probe = probe, \ | 41 | .probe = probe, \ |
66 | .ignore = ignore, \ | 42 | .ignore = ignore, \ |
@@ -228,7 +204,7 @@ struct i2c_address_data { | |||
228 | SMBus addresses, it will only call found_proc if some client is connected | 204 | SMBus addresses, it will only call found_proc if some client is connected |
229 | to the SMBus (unless a 'force' matched). */ | 205 | to the SMBus (unless a 'force' matched). */ |
230 | extern int i2c_detect(struct i2c_adapter *adapter, | 206 | extern int i2c_detect(struct i2c_adapter *adapter, |
231 | struct i2c_address_data *address_data, | 207 | struct i2c_client_address_data *address_data, |
232 | int (*found_proc) (struct i2c_adapter *, int, int)); | 208 | int (*found_proc) (struct i2c_adapter *, int, int)); |
233 | 209 | ||
234 | #endif /* def _LINUX_I2C_SENSOR_H */ | 210 | #endif /* def _LINUX_I2C_SENSOR_H */ |