aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/i2c/porting-clients7
-rw-r--r--Documentation/i2c/writing-clients35
-rw-r--r--drivers/hwmon/adm1021.c1
-rw-r--r--drivers/hwmon/adm1025.c1
-rw-r--r--drivers/hwmon/adm1026.c1
-rw-r--r--drivers/hwmon/adm1031.c1
-rw-r--r--drivers/hwmon/adm9240.c2
-rw-r--r--drivers/hwmon/asb100.c3
-rw-r--r--drivers/hwmon/atxp1.c1
-rw-r--r--drivers/hwmon/ds1621.c1
-rw-r--r--drivers/hwmon/fscher.c1
-rw-r--r--drivers/hwmon/fscpos.c1
-rw-r--r--drivers/hwmon/gl518sm.c1
-rw-r--r--drivers/hwmon/gl520sm.c1
-rw-r--r--drivers/hwmon/it87.c1
-rw-r--r--drivers/hwmon/lm63.c1
-rw-r--r--drivers/hwmon/lm75.c1
-rw-r--r--drivers/hwmon/lm77.c1
-rw-r--r--drivers/hwmon/lm78.c1
-rw-r--r--drivers/hwmon/lm80.c1
-rw-r--r--drivers/hwmon/lm83.c1
-rw-r--r--drivers/hwmon/lm85.c1
-rw-r--r--drivers/hwmon/lm87.c1
-rw-r--r--drivers/hwmon/lm90.c1
-rw-r--r--drivers/hwmon/lm92.c1
-rw-r--r--drivers/hwmon/max1619.c1
-rw-r--r--drivers/hwmon/w83781d.c1
-rw-r--r--drivers/hwmon/w83l785ts.c1
-rw-r--r--drivers/i2c/chips/ds1337.c1
-rw-r--r--drivers/i2c/chips/eeprom.c1
-rw-r--r--drivers/i2c/chips/max6875.c1
-rw-r--r--drivers/i2c/chips/pca9539.c1
-rw-r--r--drivers/i2c/chips/pcf8574.c1
-rw-r--r--drivers/i2c/chips/pcf8591.c1
-rw-r--r--include/linux/i2c-sensor.h36
-rw-r--r--include/linux/i2c.h8
36 files changed, 36 insertions, 85 deletions
diff --git a/Documentation/i2c/porting-clients b/Documentation/i2c/porting-clients
index a7adbdd9ea8a..105c6186b912 100644
--- a/Documentation/i2c/porting-clients
+++ b/Documentation/i2c/porting-clients
@@ -29,8 +29,8 @@ Technical changes:
29 Please respect this inclusion order. Some extra headers may be 29 Please respect this inclusion order. Some extra headers may be
30 required for a given driver (e.g. "lm75.h"). 30 required for a given driver (e.g. "lm75.h").
31 31
32* [Addresses] SENSORS_I2C_END becomes I2C_CLIENT_END, SENSORS_ISA_END 32* [Addresses] SENSORS_I2C_END becomes I2C_CLIENT_END, ISA addresses
33 becomes I2C_CLIENT_ISA_END. 33 are no more handled by the i2c core.
34 34
35* [Client data] Get rid of sysctl_id. Try using standard names for 35* [Client data] Get rid of sysctl_id. Try using standard names for
36 register values (for example, temp_os becomes temp_max). You're 36 register values (for example, temp_os becomes temp_max). You're
@@ -72,7 +72,8 @@ Technical changes:
72 name string, which will be filled with a lowercase, short string 72 name string, which will be filled with a lowercase, short string
73 (typically the driver name, e.g. "lm75"). 73 (typically the driver name, e.g. "lm75").
74 In i2c-only drivers, drop the i2c_is_isa_adapter check, it's 74 In i2c-only drivers, drop the i2c_is_isa_adapter check, it's
75 useless. 75 useless. Same for isa-only drivers, as the test would always be
76 true. Only hybrid drivers (which are quite rare) still need it.
76 The errorN labels are reduced to the number needed. If that number 77 The errorN labels are reduced to the number needed. If that number
77 is 2 (i2c-only drivers), it is advised that the labels are named 78 is 2 (i2c-only drivers), it is advised that the labels are named
78 exit and exit_free. For i2c+isa drivers, labels should be named 79 exit and exit_free. For i2c+isa drivers, labels should be named
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients
index 91664be91ffc..e6b546dd4f7b 100644
--- a/Documentation/i2c/writing-clients
+++ b/Documentation/i2c/writing-clients
@@ -195,31 +195,28 @@ Probing classes (sensors)
195------------------------- 195-------------------------
196 196
197If you write a `sensors' driver, you use a slightly different interface. 197If you write a `sensors' driver, you use a slightly different interface.
198As well as I2C addresses, we have to cope with ISA addresses. Also, we 198Also, we use a enum of chip types. Don't forget to include `sensors.h'.
199use a enum of chip types. Don't forget to include `sensors.h'.
200 199
201The following lists are used internally. They are all lists of integers. 200The following lists are used internally. They are all lists of integers.
202 201
203 normal_i2c: filled in by the module writer. Terminated by SENSORS_I2C_END. 202 normal_i2c: filled in by the module writer. Terminated by I2C_CLIENT_END.
204 A list of I2C addresses which should normally be examined. 203 A list of I2C addresses which should normally be examined.
205 normal_isa: filled in by the module writer. Terminated by SENSORS_ISA_END. 204 probe: insmod parameter. Initialize this list with I2C_CLIENT_END values.
206 A list of ISA addresses which should normally be examined. 205 A list of pairs. The first value is a bus number (ANY_I2C_BUS for any
207 probe: insmod parameter. Initialize this list with SENSORS_I2C_END values. 206 I2C bus), the second is the address. These addresses are also probed,
208 A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for 207 as if they were in the 'normal' list.
209 the ISA bus, -1 for any I2C bus), the second is the address. These 208 ignore: insmod parameter. Initialize this list with I2C_CLIENT_END values.
210 addresses are also probed, as if they were in the 'normal' list. 209 A list of pairs. The first value is a bus number (ANY_I2C_BUS for any
211 ignore: insmod parameter. Initialize this list with SENSORS_I2C_END values. 210 I2C bus), the second is the I2C address. These addresses are never
212 A list of pairs. The first value is a bus number (SENSORS_ISA_BUS for 211 probed. This parameter overrules 'normal' and 'probe', but not the
213 the ISA bus, -1 for any I2C bus), the second is the I2C address. These 212 'force' lists.
214 addresses are never probed. This parameter overrules 'normal' and
215 'probe', but not the 'force' lists.
216 213
217Also used is a list of pointers to sensors_force_data structures: 214Also used is a list of pointers to sensors_force_data structures:
218 force_data: insmod parameters. A list, ending with an element of which 215 force_data: insmod parameters. A list, ending with an element of which
219 the force field is NULL. 216 the force field is NULL.
220 Each element contains the type of chip and a list of pairs. 217 Each element contains the type of chip and a list of pairs.
221 The first value is a bus number (SENSORS_ISA_BUS for the ISA bus, 218 The first value is a bus number (ANY_I2C_BUS for any I2C bus), the
222 -1 for any I2C bus), the second is the address. 219 second is the address.
223 These are automatically translated to insmod variables of the form 220 These are automatically translated to insmod variables of the form
224 force_foo. 221 force_foo.
225 222
@@ -227,13 +224,11 @@ So we have a generic insmod variabled `force', and chip-specific variables
227`force_CHIPNAME'. 224`force_CHIPNAME'.
228 225
229Fortunately, as a module writer, you just have to define the `normal_i2c' 226Fortunately, as a module writer, you just have to define the `normal_i2c'
230and `normal_isa' parameters, and define what chip names are used. 227parameter, and define what chip names are used. The complete declaration
231The complete declaration could look like this: 228could look like this:
232 /* Scan i2c addresses 0x37, and 0x48 to 0x4f */ 229 /* Scan i2c addresses 0x37, and 0x48 to 0x4f */
233 static unsigned short normal_i2c[] = { 0x37, 0x48, 0x49, 0x4a, 0x4b, 0x4c, 230 static unsigned short normal_i2c[] = { 0x37, 0x48, 0x49, 0x4a, 0x4b, 0x4c,
234 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; 231 0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
235 /* Scan ISA address 0x290 */
236 static unsigned int normal_isa[] = {0x0290,SENSORS_ISA_END};
237 232
238 /* Define chips foo and bar, as well as all module parameters and things */ 233 /* Define chips foo and bar, as well as all module parameters and things */
239 SENSORS_INSMOD_2(foo,bar); 234 SENSORS_INSMOD_2(foo,bar);
diff --git a/drivers/hwmon/adm1021.c b/drivers/hwmon/adm1021.c
index a483d96e4cef..093d09cc4c14 100644
--- a/drivers/hwmon/adm1021.c
+++ b/drivers/hwmon/adm1021.c
@@ -34,7 +34,6 @@ static unsigned short normal_i2c[] = { 0x18, 0x19, 0x1a,
34 0x29, 0x2a, 0x2b, 34 0x29, 0x2a, 0x2b,
35 0x4c, 0x4d, 0x4e, 35 0x4c, 0x4d, 0x4e,
36 I2C_CLIENT_END }; 36 I2C_CLIENT_END };
37static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
38 37
39/* Insmod parameters */ 38/* Insmod parameters */
40SENSORS_INSMOD_8(adm1021, adm1023, max1617, max1617a, thmc10, lm84, gl523sm, mc1066); 39SENSORS_INSMOD_8(adm1021, adm1023, max1617, max1617a, thmc10, lm84, gl523sm, mc1066);
diff --git a/drivers/hwmon/adm1025.c b/drivers/hwmon/adm1025.c
index b68b292c00d4..bdba01e2f3ed 100644
--- a/drivers/hwmon/adm1025.c
+++ b/drivers/hwmon/adm1025.c
@@ -62,7 +62,6 @@
62 */ 62 */
63 63
64static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END }; 64static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
65static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
66 65
67/* 66/*
68 * Insmod parameters 67 * Insmod parameters
diff --git a/drivers/hwmon/adm1026.c b/drivers/hwmon/adm1026.c
index eb55133a13ee..8e8b0ef8fff3 100644
--- a/drivers/hwmon/adm1026.c
+++ b/drivers/hwmon/adm1026.c
@@ -36,7 +36,6 @@
36 36
37/* Addresses to scan */ 37/* Addresses to scan */
38static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END }; 38static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
39static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
40 39
41/* Insmod parameters */ 40/* Insmod parameters */
42SENSORS_INSMOD_1(adm1026); 41SENSORS_INSMOD_1(adm1026);
diff --git a/drivers/hwmon/adm1031.c b/drivers/hwmon/adm1031.c
index ac3b1542556e..a60187e24830 100644
--- a/drivers/hwmon/adm1031.c
+++ b/drivers/hwmon/adm1031.c
@@ -61,7 +61,6 @@
61 61
62/* Addresses to scan */ 62/* Addresses to scan */
63static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END }; 63static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
64static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
65 64
66/* Insmod parameters */ 65/* Insmod parameters */
67SENSORS_INSMOD_2(adm1030, adm1031); 66SENSORS_INSMOD_2(adm1030, adm1031);
diff --git a/drivers/hwmon/adm9240.c b/drivers/hwmon/adm9240.c
index 7ef61206ba10..d52100027665 100644
--- a/drivers/hwmon/adm9240.c
+++ b/drivers/hwmon/adm9240.c
@@ -54,8 +54,6 @@
54static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, 0x2f, 54static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, 0x2f,
55 I2C_CLIENT_END }; 55 I2C_CLIENT_END };
56 56
57static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
58
59/* Insmod parameters */ 57/* Insmod parameters */
60SENSORS_INSMOD_3(adm9240, ds1780, lm81); 58SENSORS_INSMOD_3(adm9240, ds1780, lm81);
61 59
diff --git a/drivers/hwmon/asb100.c b/drivers/hwmon/asb100.c
index 3ab7a2ddafba..d1856acf87a0 100644
--- a/drivers/hwmon/asb100.c
+++ b/drivers/hwmon/asb100.c
@@ -56,9 +56,6 @@
56/* I2C addresses to scan */ 56/* I2C addresses to scan */
57static unsigned short normal_i2c[] = { 0x2d, I2C_CLIENT_END }; 57static unsigned short normal_i2c[] = { 0x2d, I2C_CLIENT_END };
58 58
59/* ISA addresses to scan (none) */
60static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
61
62/* Insmod parameters */ 59/* Insmod parameters */
63SENSORS_INSMOD_1(asb100); 60SENSORS_INSMOD_1(asb100);
64I2C_CLIENT_MODULE_PARM(force_subclients, "List of subclient addresses: " 61I2C_CLIENT_MODULE_PARM(force_subclients, "List of subclient addresses: "
diff --git a/drivers/hwmon/atxp1.c b/drivers/hwmon/atxp1.c
index 5f79f07a4ab8..ced54189a579 100644
--- a/drivers/hwmon/atxp1.c
+++ b/drivers/hwmon/atxp1.c
@@ -42,7 +42,6 @@ MODULE_AUTHOR("Sebastian Witt <se.witt@gmx.net>");
42#define ATXP1_GPIO1MASK 0x0f 42#define ATXP1_GPIO1MASK 0x0f
43 43
44static unsigned short normal_i2c[] = { 0x37, 0x4e, I2C_CLIENT_END }; 44static unsigned short normal_i2c[] = { 0x37, 0x4e, I2C_CLIENT_END };
45static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
46 45
47SENSORS_INSMOD_1(atxp1); 46SENSORS_INSMOD_1(atxp1);
48 47
diff --git a/drivers/hwmon/ds1621.c b/drivers/hwmon/ds1621.c
index 9ed21ac46e97..4a316a7f7980 100644
--- a/drivers/hwmon/ds1621.c
+++ b/drivers/hwmon/ds1621.c
@@ -34,7 +34,6 @@
34/* Addresses to scan */ 34/* Addresses to scan */
35static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c, 35static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c,
36 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; 36 0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
37static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
38 37
39/* Insmod parameters */ 38/* Insmod parameters */
40SENSORS_INSMOD_1(ds1621); 39SENSORS_INSMOD_1(ds1621);
diff --git a/drivers/hwmon/fscher.c b/drivers/hwmon/fscher.c
index b794580a0726..c7caa95c643b 100644
--- a/drivers/hwmon/fscher.c
+++ b/drivers/hwmon/fscher.c
@@ -40,7 +40,6 @@
40 */ 40 */
41 41
42static unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END }; 42static unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END };
43static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
44 43
45/* 44/*
46 * Insmod parameters 45 * Insmod parameters
diff --git a/drivers/hwmon/fscpos.c b/drivers/hwmon/fscpos.c
index 4cb33b231124..fd75e444e758 100644
--- a/drivers/hwmon/fscpos.c
+++ b/drivers/hwmon/fscpos.c
@@ -43,7 +43,6 @@
43 * Addresses to scan 43 * Addresses to scan
44 */ 44 */
45static unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END }; 45static unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END };
46static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
47 46
48/* 47/*
49 * Insmod parameters 48 * Insmod parameters
diff --git a/drivers/hwmon/gl518sm.c b/drivers/hwmon/gl518sm.c
index 49972929a69b..34d85b1e5539 100644
--- a/drivers/hwmon/gl518sm.c
+++ b/drivers/hwmon/gl518sm.c
@@ -47,7 +47,6 @@
47 47
48/* Addresses to scan */ 48/* Addresses to scan */
49static unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; 49static unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END };
50static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
51 50
52/* Insmod parameters */ 51/* Insmod parameters */
53SENSORS_INSMOD_2(gl518sm_r00, gl518sm_r80); 52SENSORS_INSMOD_2(gl518sm_r00, gl518sm_r80);
diff --git a/drivers/hwmon/gl520sm.c b/drivers/hwmon/gl520sm.c
index ce482e17e03c..b129d153deab 100644
--- a/drivers/hwmon/gl520sm.c
+++ b/drivers/hwmon/gl520sm.c
@@ -38,7 +38,6 @@ MODULE_PARM_DESC(extra_sensor_type, "Type of extra sensor (0=autodetect, 1=tempe
38 38
39/* Addresses to scan */ 39/* Addresses to scan */
40static unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END }; 40static unsigned short normal_i2c[] = { 0x2c, 0x2d, I2C_CLIENT_END };
41static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
42 41
43/* Insmod parameters */ 42/* Insmod parameters */
44SENSORS_INSMOD_1(gl520sm); 43SENSORS_INSMOD_1(gl520sm);
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index 722ef0cd5c00..0a8d795f15c2 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -48,7 +48,6 @@
48/* Addresses to scan */ 48/* Addresses to scan */
49static unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 49static unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d,
50 0x2e, 0x2f, I2C_CLIENT_END }; 50 0x2e, 0x2f, I2C_CLIENT_END };
51static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
52static unsigned short isa_address = 0x290; 51static unsigned short isa_address = 0x290;
53 52
54/* Insmod parameters */ 53/* Insmod parameters */
diff --git a/drivers/hwmon/lm63.c b/drivers/hwmon/lm63.c
index cba0a40ad667..e19b11fd4816 100644
--- a/drivers/hwmon/lm63.c
+++ b/drivers/hwmon/lm63.c
@@ -53,7 +53,6 @@
53 */ 53 */
54 54
55static unsigned short normal_i2c[] = { 0x4c, I2C_CLIENT_END }; 55static unsigned short normal_i2c[] = { 0x4c, I2C_CLIENT_END };
56static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
57 56
58/* 57/*
59 * Insmod parameters 58 * Insmod parameters
diff --git a/drivers/hwmon/lm75.c b/drivers/hwmon/lm75.c
index 129c8f213331..54dda7d11ace 100644
--- a/drivers/hwmon/lm75.c
+++ b/drivers/hwmon/lm75.c
@@ -32,7 +32,6 @@
32/* Addresses to scan */ 32/* Addresses to scan */
33static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c, 33static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c,
34 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; 34 0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
35static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
36 35
37/* Insmod parameters */ 36/* Insmod parameters */
38SENSORS_INSMOD_1(lm75); 37SENSORS_INSMOD_1(lm75);
diff --git a/drivers/hwmon/lm77.c b/drivers/hwmon/lm77.c
index 15f30fdc75c6..d47aab3b3c05 100644
--- a/drivers/hwmon/lm77.c
+++ b/drivers/hwmon/lm77.c
@@ -36,7 +36,6 @@
36 36
37/* Addresses to scan */ 37/* Addresses to scan */
38static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, I2C_CLIENT_END }; 38static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, I2C_CLIENT_END };
39static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
40 39
41/* Insmod parameters */ 40/* Insmod parameters */
42SENSORS_INSMOD_1(lm77); 41SENSORS_INSMOD_1(lm77);
diff --git a/drivers/hwmon/lm78.c b/drivers/hwmon/lm78.c
index c3712f8d9964..784935f77016 100644
--- a/drivers/hwmon/lm78.c
+++ b/drivers/hwmon/lm78.c
@@ -34,7 +34,6 @@ static unsigned short normal_i2c[] = { 0x20, 0x21, 0x22, 0x23, 0x24,
34 0x25, 0x26, 0x27, 0x28, 0x29, 34 0x25, 0x26, 0x27, 0x28, 0x29,
35 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 35 0x2a, 0x2b, 0x2c, 0x2d, 0x2e,
36 0x2f, I2C_CLIENT_END }; 36 0x2f, I2C_CLIENT_END };
37static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
38static unsigned short isa_address = 0x290; 37static unsigned short isa_address = 0x290;
39 38
40/* Insmod parameters */ 39/* Insmod parameters */
diff --git a/drivers/hwmon/lm80.c b/drivers/hwmon/lm80.c
index dbf8df386250..fa2cb17018cc 100644
--- a/drivers/hwmon/lm80.c
+++ b/drivers/hwmon/lm80.c
@@ -33,7 +33,6 @@
33/* Addresses to scan */ 33/* Addresses to scan */
34static unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c, 34static unsigned short normal_i2c[] = { 0x28, 0x29, 0x2a, 0x2b, 0x2c,
35 0x2d, 0x2e, 0x2f, I2C_CLIENT_END }; 35 0x2d, 0x2e, 0x2f, I2C_CLIENT_END };
36static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
37 36
38/* Insmod parameters */ 37/* Insmod parameters */
39SENSORS_INSMOD_1(lm80); 38SENSORS_INSMOD_1(lm80);
diff --git a/drivers/hwmon/lm83.c b/drivers/hwmon/lm83.c
index f3f3901c7294..0223b4d2ce1d 100644
--- a/drivers/hwmon/lm83.c
+++ b/drivers/hwmon/lm83.c
@@ -47,7 +47,6 @@ static unsigned short normal_i2c[] = { 0x18, 0x19, 0x1a,
47 0x29, 0x2a, 0x2b, 47 0x29, 0x2a, 0x2b,
48 0x4c, 0x4d, 0x4e, 48 0x4c, 0x4d, 0x4e,
49 I2C_CLIENT_END }; 49 I2C_CLIENT_END };
50static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
51 50
52/* 51/*
53 * Insmod parameters 52 * Insmod parameters
diff --git a/drivers/hwmon/lm85.c b/drivers/hwmon/lm85.c
index 4203f904bbe2..8954d64614ff 100644
--- a/drivers/hwmon/lm85.c
+++ b/drivers/hwmon/lm85.c
@@ -35,7 +35,6 @@
35 35
36/* Addresses to scan */ 36/* Addresses to scan */
37static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END }; 37static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
38static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
39 38
40/* Insmod parameters */ 39/* Insmod parameters */
41SENSORS_INSMOD_6(lm85b, lm85c, adm1027, adt7463, emc6d100, emc6d102); 40SENSORS_INSMOD_6(lm85b, lm85c, adm1027, adt7463, emc6d100, emc6d102);
diff --git a/drivers/hwmon/lm87.c b/drivers/hwmon/lm87.c
index 7e14858c257b..1dc3bf52b40d 100644
--- a/drivers/hwmon/lm87.c
+++ b/drivers/hwmon/lm87.c
@@ -68,7 +68,6 @@
68 */ 68 */
69 69
70static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END }; 70static unsigned short normal_i2c[] = { 0x2c, 0x2d, 0x2e, I2C_CLIENT_END };
71static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
72 71
73/* 72/*
74 * Insmod parameters 73 * Insmod parameters
diff --git a/drivers/hwmon/lm90.c b/drivers/hwmon/lm90.c
index c1e8d0e965f7..4b914ec205fa 100644
--- a/drivers/hwmon/lm90.c
+++ b/drivers/hwmon/lm90.c
@@ -91,7 +91,6 @@
91 */ 91 */
92 92
93static unsigned short normal_i2c[] = { 0x4c, 0x4d, I2C_CLIENT_END }; 93static unsigned short normal_i2c[] = { 0x4c, 0x4d, I2C_CLIENT_END };
94static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
95 94
96/* 95/*
97 * Insmod parameters 96 * Insmod parameters
diff --git a/drivers/hwmon/lm92.c b/drivers/hwmon/lm92.c
index 0fb601c07519..9c43120d6bd7 100644
--- a/drivers/hwmon/lm92.c
+++ b/drivers/hwmon/lm92.c
@@ -52,7 +52,6 @@
52 resulting in 4 possible addresses. */ 52 resulting in 4 possible addresses. */
53static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 53static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b,
54 I2C_CLIENT_END }; 54 I2C_CLIENT_END };
55static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
56 55
57/* Insmod parameters */ 56/* Insmod parameters */
58SENSORS_INSMOD_1(lm92); 57SENSORS_INSMOD_1(lm92);
diff --git a/drivers/hwmon/max1619.c b/drivers/hwmon/max1619.c
index 56c34c2d3619..5f0376575c62 100644
--- a/drivers/hwmon/max1619.c
+++ b/drivers/hwmon/max1619.c
@@ -39,7 +39,6 @@ static unsigned short normal_i2c[] = { 0x18, 0x19, 0x1a,
39 0x29, 0x2a, 0x2b, 39 0x29, 0x2a, 0x2b,
40 0x4c, 0x4d, 0x4e, 40 0x4c, 0x4d, 0x4e,
41 I2C_CLIENT_END }; 41 I2C_CLIENT_END };
42static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
43 42
44/* 43/*
45 * Insmod parameters 44 * Insmod parameters
diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c
index a4ab819ac360..70718559de75 100644
--- a/drivers/hwmon/w83781d.c
+++ b/drivers/hwmon/w83781d.c
@@ -50,7 +50,6 @@
50static unsigned short normal_i2c[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 50static unsigned short normal_i2c[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25,
51 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b, 51 0x26, 0x27, 0x28, 0x29, 0x2a, 0x2b,
52 0x2c, 0x2d, 0x2e, 0x2f, I2C_CLIENT_END }; 52 0x2c, 0x2d, 0x2e, 0x2f, I2C_CLIENT_END };
53static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
54static unsigned short isa_address = 0x290; 53static unsigned short isa_address = 0x290;
55 54
56/* Insmod parameters */ 55/* Insmod parameters */
diff --git a/drivers/hwmon/w83l785ts.c b/drivers/hwmon/w83l785ts.c
index 1f763499dac4..9cd1939cd040 100644
--- a/drivers/hwmon/w83l785ts.c
+++ b/drivers/hwmon/w83l785ts.c
@@ -49,7 +49,6 @@
49 */ 49 */
50 50
51static unsigned short normal_i2c[] = { 0x2e, I2C_CLIENT_END }; 51static unsigned short normal_i2c[] = { 0x2e, I2C_CLIENT_END };
52static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
53 52
54/* 53/*
55 * Insmod parameters 54 * Insmod parameters
diff --git a/drivers/i2c/chips/ds1337.c b/drivers/i2c/chips/ds1337.c
index 82cf959989fd..6ac0a6e00769 100644
--- a/drivers/i2c/chips/ds1337.c
+++ b/drivers/i2c/chips/ds1337.c
@@ -39,7 +39,6 @@
39 * Functions declaration 39 * Functions declaration
40 */ 40 */
41static unsigned short normal_i2c[] = { 0x68, I2C_CLIENT_END }; 41static unsigned short normal_i2c[] = { 0x68, I2C_CLIENT_END };
42static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
43 42
44SENSORS_INSMOD_1(ds1337); 43SENSORS_INSMOD_1(ds1337);
45 44
diff --git a/drivers/i2c/chips/eeprom.c b/drivers/i2c/chips/eeprom.c
index a2da31b0dd7b..88f83bac3845 100644
--- a/drivers/i2c/chips/eeprom.c
+++ b/drivers/i2c/chips/eeprom.c
@@ -38,7 +38,6 @@
38/* Addresses to scan */ 38/* Addresses to scan */
39static unsigned short normal_i2c[] = { 0x50, 0x51, 0x52, 0x53, 0x54, 39static unsigned short normal_i2c[] = { 0x50, 0x51, 0x52, 0x53, 0x54,
40 0x55, 0x56, 0x57, I2C_CLIENT_END }; 40 0x55, 0x56, 0x57, I2C_CLIENT_END };
41static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
42 41
43/* Insmod parameters */ 42/* Insmod parameters */
44SENSORS_INSMOD_1(eeprom); 43SENSORS_INSMOD_1(eeprom);
diff --git a/drivers/i2c/chips/max6875.c b/drivers/i2c/chips/max6875.c
index f0e306237739..d1d48586b90e 100644
--- a/drivers/i2c/chips/max6875.c
+++ b/drivers/i2c/chips/max6875.c
@@ -36,7 +36,6 @@
36 36
37/* Do not scan - the MAX6875 access method will write to some EEPROM chips */ 37/* Do not scan - the MAX6875 access method will write to some EEPROM chips */
38static unsigned short normal_i2c[] = {I2C_CLIENT_END}; 38static unsigned short normal_i2c[] = {I2C_CLIENT_END};
39static unsigned int normal_isa[] = {I2C_CLIENT_ISA_END};
40 39
41/* Insmod parameters */ 40/* Insmod parameters */
42SENSORS_INSMOD_1(max6875); 41SENSORS_INSMOD_1(max6875);
diff --git a/drivers/i2c/chips/pca9539.c b/drivers/i2c/chips/pca9539.c
index 9f3ad45daae2..c5b052363d9a 100644
--- a/drivers/i2c/chips/pca9539.c
+++ b/drivers/i2c/chips/pca9539.c
@@ -17,7 +17,6 @@
17 17
18/* Addresses to scan */ 18/* Addresses to scan */
19static unsigned short normal_i2c[] = {0x74, 0x75, 0x76, 0x77, I2C_CLIENT_END}; 19static unsigned short normal_i2c[] = {0x74, 0x75, 0x76, 0x77, I2C_CLIENT_END};
20static unsigned int normal_isa[] = {I2C_CLIENT_ISA_END};
21 20
22/* Insmod parameters */ 21/* Insmod parameters */
23SENSORS_INSMOD_1(pca9539); 22SENSORS_INSMOD_1(pca9539);
diff --git a/drivers/i2c/chips/pcf8574.c b/drivers/i2c/chips/pcf8574.c
index cfcf64654080..7a1fa7914630 100644
--- a/drivers/i2c/chips/pcf8574.c
+++ b/drivers/i2c/chips/pcf8574.c
@@ -45,7 +45,6 @@
45static unsigned short normal_i2c[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, 45static unsigned short normal_i2c[] = { 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27,
46 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, 46 0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f,
47 I2C_CLIENT_END }; 47 I2C_CLIENT_END };
48static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
49 48
50/* Insmod parameters */ 49/* Insmod parameters */
51SENSORS_INSMOD_2(pcf8574, pcf8574a); 50SENSORS_INSMOD_2(pcf8574, pcf8574a);
diff --git a/drivers/i2c/chips/pcf8591.c b/drivers/i2c/chips/pcf8591.c
index db812ade8564..225b512dd4ad 100644
--- a/drivers/i2c/chips/pcf8591.c
+++ b/drivers/i2c/chips/pcf8591.c
@@ -29,7 +29,6 @@
29/* Addresses to scan */ 29/* Addresses to scan */
30static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c, 30static unsigned short normal_i2c[] = { 0x48, 0x49, 0x4a, 0x4b, 0x4c,
31 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; 31 0x4d, 0x4e, 0x4f, I2C_CLIENT_END };
32static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
33 32
34/* Insmod parameters */ 33/* Insmod parameters */
35SENSORS_INSMOD_1(pcf8591); 34SENSORS_INSMOD_1(pcf8591);
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