aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/it87.c29
-rw-r--r--drivers/hwmon/lm78.c29
-rw-r--r--drivers/hwmon/pc87360.c5
-rw-r--r--drivers/hwmon/sis5595.c5
-rw-r--r--drivers/hwmon/smsc47b397.c5
-rw-r--r--drivers/hwmon/smsc47m1.c5
-rw-r--r--drivers/hwmon/via686a.c5
-rw-r--r--drivers/hwmon/w83627ehf.c5
-rw-r--r--drivers/hwmon/w83627hf.c5
-rw-r--r--drivers/hwmon/w83781d.c28
10 files changed, 97 insertions, 24 deletions
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c
index 92c5b2420f9b..a438adb4b09f 100644
--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -36,6 +36,7 @@
36#include <linux/slab.h> 36#include <linux/slab.h>
37#include <linux/jiffies.h> 37#include <linux/jiffies.h>
38#include <linux/i2c.h> 38#include <linux/i2c.h>
39#include <linux/i2c-isa.h>
39#include <linux/i2c-sensor.h> 40#include <linux/i2c-sensor.h>
40#include <linux/i2c-vid.h> 41#include <linux/i2c-vid.h>
41#include <linux/hwmon-sysfs.h> 42#include <linux/hwmon-sysfs.h>
@@ -242,6 +243,14 @@ static struct i2c_driver it87_driver = {
242 .detach_client = it87_detach_client, 243 .detach_client = it87_detach_client,
243}; 244};
244 245
246static struct i2c_driver it87_isa_driver = {
247 .owner = THIS_MODULE,
248 .name = "it87-isa",
249 .attach_adapter = it87_attach_adapter,
250 .detach_client = it87_detach_client,
251};
252
253
245static ssize_t show_in(struct device *dev, struct device_attribute *attr, 254static ssize_t show_in(struct device *dev, struct device_attribute *attr,
246 char *buf) 255 char *buf)
247{ 256{
@@ -741,7 +750,7 @@ int it87_detect(struct i2c_adapter *adapter, int address, int kind)
741 750
742 /* Reserve the ISA region */ 751 /* Reserve the ISA region */
743 if (is_isa) 752 if (is_isa)
744 if (!request_region(address, IT87_EXTENT, it87_driver.name)) 753 if (!request_region(address, IT87_EXTENT, it87_isa_driver.name))
745 goto ERROR0; 754 goto ERROR0;
746 755
747 /* Probe whether there is anything available on this address. Already 756 /* Probe whether there is anything available on this address. Already
@@ -787,7 +796,7 @@ int it87_detect(struct i2c_adapter *adapter, int address, int kind)
787 i2c_set_clientdata(new_client, data); 796 i2c_set_clientdata(new_client, data);
788 new_client->addr = address; 797 new_client->addr = address;
789 new_client->adapter = adapter; 798 new_client->adapter = adapter;
790 new_client->driver = &it87_driver; 799 new_client->driver = is_isa ? &it87_isa_driver : &it87_driver;
791 new_client->flags = 0; 800 new_client->flags = 0;
792 801
793 /* Now, we do the remaining detection. */ 802 /* Now, we do the remaining detection. */
@@ -1172,16 +1181,28 @@ static struct it87_data *it87_update_device(struct device *dev)
1172 1181
1173static int __init sm_it87_init(void) 1182static int __init sm_it87_init(void)
1174{ 1183{
1175 int addr; 1184 int addr, res;
1176 1185
1177 if (!it87_find(&addr)) { 1186 if (!it87_find(&addr)) {
1178 normal_isa[0] = addr; 1187 normal_isa[0] = addr;
1179 } 1188 }
1180 return i2c_add_driver(&it87_driver); 1189
1190 res = i2c_add_driver(&it87_driver);
1191 if (res)
1192 return res;
1193
1194 res = i2c_isa_add_driver(&it87_isa_driver);
1195 if (res) {
1196 i2c_del_driver(&it87_driver);
1197 return res;
1198 }
1199
1200 return 0;
1181} 1201}
1182 1202
1183static void __exit sm_it87_exit(void) 1203static void __exit sm_it87_exit(void)
1184{ 1204{
1205 i2c_isa_del_driver(&it87_isa_driver);
1185 i2c_del_driver(&it87_driver); 1206 i2c_del_driver(&it87_driver);
1186} 1207}
1187 1208
diff --git a/drivers/hwmon/lm78.c b/drivers/hwmon/lm78.c
index 570098e15366..a69e7d4670ad 100644
--- a/drivers/hwmon/lm78.c
+++ b/drivers/hwmon/lm78.c
@@ -23,6 +23,7 @@
23#include <linux/slab.h> 23#include <linux/slab.h>
24#include <linux/jiffies.h> 24#include <linux/jiffies.h>
25#include <linux/i2c.h> 25#include <linux/i2c.h>
26#include <linux/i2c-isa.h>
26#include <linux/i2c-sensor.h> 27#include <linux/i2c-sensor.h>
27#include <linux/hwmon.h> 28#include <linux/hwmon.h>
28#include <linux/err.h> 29#include <linux/err.h>
@@ -177,6 +178,14 @@ static struct i2c_driver lm78_driver = {
177 .detach_client = lm78_detach_client, 178 .detach_client = lm78_detach_client,
178}; 179};
179 180
181static struct i2c_driver lm78_isa_driver = {
182 .owner = THIS_MODULE,
183 .name = "lm78-isa",
184 .attach_adapter = lm78_attach_adapter,
185 .detach_client = lm78_detach_client,
186};
187
188
180/* 7 Voltages */ 189/* 7 Voltages */
181static ssize_t show_in(struct device *dev, char *buf, int nr) 190static ssize_t show_in(struct device *dev, char *buf, int nr)
182{ 191{
@@ -488,7 +497,8 @@ int lm78_detect(struct i2c_adapter *adapter, int address, int kind)
488 497
489 /* Reserve the ISA region */ 498 /* Reserve the ISA region */
490 if (is_isa) 499 if (is_isa)
491 if (!request_region(address, LM78_EXTENT, lm78_driver.name)) { 500 if (!request_region(address, LM78_EXTENT,
501 lm78_isa_driver.name)) {
492 err = -EBUSY; 502 err = -EBUSY;
493 goto ERROR0; 503 goto ERROR0;
494 } 504 }
@@ -543,7 +553,7 @@ int lm78_detect(struct i2c_adapter *adapter, int address, int kind)
543 i2c_set_clientdata(new_client, data); 553 i2c_set_clientdata(new_client, data);
544 new_client->addr = address; 554 new_client->addr = address;
545 new_client->adapter = adapter; 555 new_client->adapter = adapter;
546 new_client->driver = &lm78_driver; 556 new_client->driver = is_isa ? &lm78_isa_driver : &lm78_driver;
547 new_client->flags = 0; 557 new_client->flags = 0;
548 558
549 /* Now, we do the remaining detection. */ 559 /* Now, we do the remaining detection. */
@@ -788,11 +798,24 @@ static struct lm78_data *lm78_update_device(struct device *dev)
788 798
789static int __init sm_lm78_init(void) 799static int __init sm_lm78_init(void)
790{ 800{
791 return i2c_add_driver(&lm78_driver); 801 int res;
802
803 res = i2c_add_driver(&lm78_driver);
804 if (res)
805 return res;
806
807 res = i2c_isa_add_driver(&lm78_isa_driver);
808 if (res) {
809 i2c_del_driver(&lm78_driver);
810 return res;
811 }
812
813 return 0;
792} 814}
793 815
794static void __exit sm_lm78_exit(void) 816static void __exit sm_lm78_exit(void)
795{ 817{
818 i2c_isa_del_driver(&lm78_isa_driver);
796 i2c_del_driver(&lm78_driver); 819 i2c_del_driver(&lm78_driver);
797} 820}
798 821
diff --git a/drivers/hwmon/pc87360.c b/drivers/hwmon/pc87360.c
index 496549bf96b9..97ffe5b5cf83 100644
--- a/drivers/hwmon/pc87360.c
+++ b/drivers/hwmon/pc87360.c
@@ -38,6 +38,7 @@
38#include <linux/slab.h> 38#include <linux/slab.h>
39#include <linux/jiffies.h> 39#include <linux/jiffies.h>
40#include <linux/i2c.h> 40#include <linux/i2c.h>
41#include <linux/i2c-isa.h>
41#include <linux/i2c-sensor.h> 42#include <linux/i2c-sensor.h>
42#include <linux/i2c-vid.h> 43#include <linux/i2c-vid.h>
43#include <linux/hwmon.h> 44#include <linux/hwmon.h>
@@ -1344,12 +1345,12 @@ static int __init pc87360_init(void)
1344 return -ENODEV; 1345 return -ENODEV;
1345 } 1346 }
1346 1347
1347 return i2c_add_driver(&pc87360_driver); 1348 return i2c_isa_add_driver(&pc87360_driver);
1348} 1349}
1349 1350
1350static void __exit pc87360_exit(void) 1351static void __exit pc87360_exit(void)
1351{ 1352{
1352 i2c_del_driver(&pc87360_driver); 1353 i2c_isa_del_driver(&pc87360_driver);
1353} 1354}
1354 1355
1355 1356
diff --git a/drivers/hwmon/sis5595.c b/drivers/hwmon/sis5595.c
index ea5934f89f05..e5db835d63f0 100644
--- a/drivers/hwmon/sis5595.c
+++ b/drivers/hwmon/sis5595.c
@@ -55,6 +55,7 @@
55#include <linux/ioport.h> 55#include <linux/ioport.h>
56#include <linux/pci.h> 56#include <linux/pci.h>
57#include <linux/i2c.h> 57#include <linux/i2c.h>
58#include <linux/i2c-isa.h>
58#include <linux/i2c-sensor.h> 59#include <linux/i2c-sensor.h>
59#include <linux/hwmon.h> 60#include <linux/hwmon.h>
60#include <linux/err.h> 61#include <linux/err.h>
@@ -790,7 +791,7 @@ static int __devinit sis5595_pci_probe(struct pci_dev *dev,
790 normal_isa[0] = addr; 791 normal_isa[0] = addr;
791 792
792 s_bridge = pci_dev_get(dev); 793 s_bridge = pci_dev_get(dev);
793 if (i2c_add_driver(&sis5595_driver)) { 794 if (i2c_isa_add_driver(&sis5595_driver)) {
794 pci_dev_put(s_bridge); 795 pci_dev_put(s_bridge);
795 s_bridge = NULL; 796 s_bridge = NULL;
796 } 797 }
@@ -817,7 +818,7 @@ static void __exit sm_sis5595_exit(void)
817{ 818{
818 pci_unregister_driver(&sis5595_pci_driver); 819 pci_unregister_driver(&sis5595_pci_driver);
819 if (s_bridge != NULL) { 820 if (s_bridge != NULL) {
820 i2c_del_driver(&sis5595_driver); 821 i2c_isa_del_driver(&sis5595_driver);
821 pci_dev_put(s_bridge); 822 pci_dev_put(s_bridge);
822 s_bridge = NULL; 823 s_bridge = NULL;
823 } 824 }
diff --git a/drivers/hwmon/smsc47b397.c b/drivers/hwmon/smsc47b397.c
index 96b9eb40f425..0f965921b8ed 100644
--- a/drivers/hwmon/smsc47b397.c
+++ b/drivers/hwmon/smsc47b397.c
@@ -31,6 +31,7 @@
31#include <linux/ioport.h> 31#include <linux/ioport.h>
32#include <linux/jiffies.h> 32#include <linux/jiffies.h>
33#include <linux/i2c.h> 33#include <linux/i2c.h>
34#include <linux/i2c-isa.h>
34#include <linux/i2c-sensor.h> 35#include <linux/i2c-sensor.h>
35#include <linux/hwmon.h> 36#include <linux/hwmon.h>
36#include <linux/err.h> 37#include <linux/err.h>
@@ -350,12 +351,12 @@ static int __init smsc47b397_init(void)
350 if ((ret = smsc47b397_find(normal_isa))) 351 if ((ret = smsc47b397_find(normal_isa)))
351 return ret; 352 return ret;
352 353
353 return i2c_add_driver(&smsc47b397_driver); 354 return i2c_isa_add_driver(&smsc47b397_driver);
354} 355}
355 356
356static void __exit smsc47b397_exit(void) 357static void __exit smsc47b397_exit(void)
357{ 358{
358 i2c_del_driver(&smsc47b397_driver); 359 i2c_isa_del_driver(&smsc47b397_driver);
359} 360}
360 361
361MODULE_AUTHOR("Mark M. Hoffman <mhoffman@lightlink.com>"); 362MODULE_AUTHOR("Mark M. Hoffman <mhoffman@lightlink.com>");
diff --git a/drivers/hwmon/smsc47m1.c b/drivers/hwmon/smsc47m1.c
index de7c7f804d66..b07d01ecd2e3 100644
--- a/drivers/hwmon/smsc47m1.c
+++ b/drivers/hwmon/smsc47m1.c
@@ -30,6 +30,7 @@
30#include <linux/ioport.h> 30#include <linux/ioport.h>
31#include <linux/jiffies.h> 31#include <linux/jiffies.h>
32#include <linux/i2c.h> 32#include <linux/i2c.h>
33#include <linux/i2c-isa.h>
33#include <linux/i2c-sensor.h> 34#include <linux/i2c-sensor.h>
34#include <linux/hwmon.h> 35#include <linux/hwmon.h>
35#include <linux/err.h> 36#include <linux/err.h>
@@ -592,12 +593,12 @@ static int __init sm_smsc47m1_init(void)
592 return -ENODEV; 593 return -ENODEV;
593 } 594 }
594 595
595 return i2c_add_driver(&smsc47m1_driver); 596 return i2c_isa_add_driver(&smsc47m1_driver);
596} 597}
597 598
598static void __exit sm_smsc47m1_exit(void) 599static void __exit sm_smsc47m1_exit(void)
599{ 600{
600 i2c_del_driver(&smsc47m1_driver); 601 i2c_isa_del_driver(&smsc47m1_driver);
601} 602}
602 603
603MODULE_AUTHOR("Mark D. Studebaker <mdsxyz123@yahoo.com>"); 604MODULE_AUTHOR("Mark D. Studebaker <mdsxyz123@yahoo.com>");
diff --git a/drivers/hwmon/via686a.c b/drivers/hwmon/via686a.c
index 8eb9d084149d..e6fc43a8ba47 100644
--- a/drivers/hwmon/via686a.c
+++ b/drivers/hwmon/via686a.c
@@ -35,6 +35,7 @@
35#include <linux/pci.h> 35#include <linux/pci.h>
36#include <linux/jiffies.h> 36#include <linux/jiffies.h>
37#include <linux/i2c.h> 37#include <linux/i2c.h>
38#include <linux/i2c-isa.h>
38#include <linux/i2c-sensor.h> 39#include <linux/i2c-sensor.h>
39#include <linux/hwmon.h> 40#include <linux/hwmon.h>
40#include <linux/err.h> 41#include <linux/err.h>
@@ -846,7 +847,7 @@ static int __devinit via686a_pci_probe(struct pci_dev *dev,
846 normal_isa[0] = addr; 847 normal_isa[0] = addr;
847 848
848 s_bridge = pci_dev_get(dev); 849 s_bridge = pci_dev_get(dev);
849 if (i2c_add_driver(&via686a_driver)) { 850 if (i2c_isa_add_driver(&via686a_driver)) {
850 pci_dev_put(s_bridge); 851 pci_dev_put(s_bridge);
851 s_bridge = NULL; 852 s_bridge = NULL;
852 } 853 }
@@ -873,7 +874,7 @@ static void __exit sm_via686a_exit(void)
873{ 874{
874 pci_unregister_driver(&via686a_pci_driver); 875 pci_unregister_driver(&via686a_pci_driver);
875 if (s_bridge != NULL) { 876 if (s_bridge != NULL) {
876 i2c_del_driver(&via686a_driver); 877 i2c_isa_del_driver(&via686a_driver);
877 pci_dev_put(s_bridge); 878 pci_dev_put(s_bridge);
878 s_bridge = NULL; 879 s_bridge = NULL;
879 } 880 }
diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
index 956e7f830aa6..a3c642ef5c42 100644
--- a/drivers/hwmon/w83627ehf.c
+++ b/drivers/hwmon/w83627ehf.c
@@ -40,6 +40,7 @@
40#include <linux/init.h> 40#include <linux/init.h>
41#include <linux/slab.h> 41#include <linux/slab.h>
42#include <linux/i2c.h> 42#include <linux/i2c.h>
43#include <linux/i2c-isa.h>
43#include <linux/i2c-sensor.h> 44#include <linux/i2c-sensor.h>
44#include <linux/hwmon.h> 45#include <linux/hwmon.h>
45#include <linux/err.h> 46#include <linux/err.h>
@@ -847,12 +848,12 @@ static int __init sensors_w83627ehf_init(void)
847 && w83627ehf_find(0x4e, &normal_isa[0])) 848 && w83627ehf_find(0x4e, &normal_isa[0]))
848 return -ENODEV; 849 return -ENODEV;
849 850
850 return i2c_add_driver(&w83627ehf_driver); 851 return i2c_isa_add_driver(&w83627ehf_driver);
851} 852}
852 853
853static void __exit sensors_w83627ehf_exit(void) 854static void __exit sensors_w83627ehf_exit(void)
854{ 855{
855 i2c_del_driver(&w83627ehf_driver); 856 i2c_isa_del_driver(&w83627ehf_driver);
856} 857}
857 858
858MODULE_AUTHOR("Jean Delvare <khali@linux-fr.org>"); 859MODULE_AUTHOR("Jean Delvare <khali@linux-fr.org>");
diff --git a/drivers/hwmon/w83627hf.c b/drivers/hwmon/w83627hf.c
index da2f4992ee21..a2c7cea502cb 100644
--- a/drivers/hwmon/w83627hf.c
+++ b/drivers/hwmon/w83627hf.c
@@ -42,6 +42,7 @@
42#include <linux/slab.h> 42#include <linux/slab.h>
43#include <linux/jiffies.h> 43#include <linux/jiffies.h>
44#include <linux/i2c.h> 44#include <linux/i2c.h>
45#include <linux/i2c-isa.h>
45#include <linux/i2c-sensor.h> 46#include <linux/i2c-sensor.h>
46#include <linux/i2c-vid.h> 47#include <linux/i2c-vid.h>
47#include <linux/hwmon.h> 48#include <linux/hwmon.h>
@@ -1507,12 +1508,12 @@ static int __init sensors_w83627hf_init(void)
1507 } 1508 }
1508 normal_isa[0] = addr; 1509 normal_isa[0] = addr;
1509 1510
1510 return i2c_add_driver(&w83627hf_driver); 1511 return i2c_isa_add_driver(&w83627hf_driver);
1511} 1512}
1512 1513
1513static void __exit sensors_w83627hf_exit(void) 1514static void __exit sensors_w83627hf_exit(void)
1514{ 1515{
1515 i2c_del_driver(&w83627hf_driver); 1516 i2c_isa_del_driver(&w83627hf_driver);
1516} 1517}
1517 1518
1518MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>, " 1519MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>, "
diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c
index c83ae769e362..69b061e2dc00 100644
--- a/drivers/hwmon/w83781d.c
+++ b/drivers/hwmon/w83781d.c
@@ -38,6 +38,7 @@
38#include <linux/slab.h> 38#include <linux/slab.h>
39#include <linux/jiffies.h> 39#include <linux/jiffies.h>
40#include <linux/i2c.h> 40#include <linux/i2c.h>
41#include <linux/i2c-isa.h>
41#include <linux/i2c-sensor.h> 42#include <linux/i2c-sensor.h>
42#include <linux/i2c-vid.h> 43#include <linux/i2c-vid.h>
43#include <linux/hwmon.h> 44#include <linux/hwmon.h>
@@ -276,6 +277,14 @@ static struct i2c_driver w83781d_driver = {
276 .detach_client = w83781d_detach_client, 277 .detach_client = w83781d_detach_client,
277}; 278};
278 279
280static struct i2c_driver w83781d_isa_driver = {
281 .owner = THIS_MODULE,
282 .name = "w83781d-isa",
283 .attach_adapter = w83781d_attach_adapter,
284 .detach_client = w83781d_detach_client,
285};
286
287
279/* following are the sysfs callback functions */ 288/* following are the sysfs callback functions */
280#define show_in_reg(reg) \ 289#define show_in_reg(reg) \
281static ssize_t show_##reg (struct device *dev, char *buf, int nr) \ 290static ssize_t show_##reg (struct device *dev, char *buf, int nr) \
@@ -1002,7 +1011,7 @@ w83781d_detect(struct i2c_adapter *adapter, int address, int kind)
1002 1011
1003 if (is_isa) 1012 if (is_isa)
1004 if (!request_region(address, W83781D_EXTENT, 1013 if (!request_region(address, W83781D_EXTENT,
1005 w83781d_driver.name)) { 1014 w83781d_isa_driver.name)) {
1006 dev_dbg(&adapter->dev, "Request of region " 1015 dev_dbg(&adapter->dev, "Request of region "
1007 "0x%x-0x%x for w83781d failed\n", address, 1016 "0x%x-0x%x for w83781d failed\n", address,
1008 address + W83781D_EXTENT - 1); 1017 address + W83781D_EXTENT - 1);
@@ -1060,7 +1069,7 @@ w83781d_detect(struct i2c_adapter *adapter, int address, int kind)
1060 new_client->addr = address; 1069 new_client->addr = address;
1061 init_MUTEX(&data->lock); 1070 init_MUTEX(&data->lock);
1062 new_client->adapter = adapter; 1071 new_client->adapter = adapter;
1063 new_client->driver = &w83781d_driver; 1072 new_client->driver = is_isa ? &w83781d_isa_driver : &w83781d_driver;
1064 new_client->flags = 0; 1073 new_client->flags = 0;
1065 1074
1066 /* Now, we do the remaining detection. */ 1075 /* Now, we do the remaining detection. */
@@ -1636,12 +1645,25 @@ static struct w83781d_data *w83781d_update_device(struct device *dev)
1636static int __init 1645static int __init
1637sensors_w83781d_init(void) 1646sensors_w83781d_init(void)
1638{ 1647{
1639 return i2c_add_driver(&w83781d_driver); 1648 int res;
1649
1650 res = i2c_add_driver(&w83781d_driver);
1651 if (res)
1652 return res;
1653
1654 res = i2c_isa_add_driver(&w83781d_isa_driver);
1655 if (res) {
1656 i2c_del_driver(&w83781d_driver);
1657 return res;
1658 }
1659
1660 return 0;
1640} 1661}
1641 1662
1642static void __exit 1663static void __exit
1643sensors_w83781d_exit(void) 1664sensors_w83781d_exit(void)
1644{ 1665{
1666 i2c_isa_del_driver(&w83781d_isa_driver);
1645 i2c_del_driver(&w83781d_driver); 1667 i2c_del_driver(&w83781d_driver);
1646} 1668}
1647 1669