aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-07-31 15:36:24 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-05 12:14:19 -0400
commitb78ec31582c60578ee1d3bb470791d6dde96ccf7 (patch)
treefa36aebdd3235c5cce1f70bac34066c4eeb5108b /include/linux
parentef8dec5d8b3e96e359f377f35cd8caff42fe6d58 (diff)
[PATCH] hwmon: hwmon vs i2c, second round (03/11)
We now have two identical structures, i2c_address_data in i2c-sensor.h and i2c_client_address_data in i2c.h. We can kill one of them, I choose to keep the one in i2c.h as it makes more sense (this structure is not specific to sensors.) Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/i2c-sensor.h30
1 files changed, 3 insertions, 27 deletions
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*/
44struct 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). */
230extern int i2c_detect(struct i2c_adapter *adapter, 206extern 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 */