aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/feature-removal-schedule.txt9
-rw-r--r--arch/arm/configs/badge4_defconfig1
-rw-r--r--arch/arm/configs/clps7500_defconfig1
-rw-r--r--arch/arm/configs/footbridge_defconfig1
-rw-r--r--arch/arm/configs/neponset_defconfig1
-rw-r--r--arch/arm/configs/picotux200_defconfig1
-rw-r--r--arch/arm/configs/rpc_defconfig1
-rw-r--r--arch/arm/configs/s3c2410_defconfig1
-rw-r--r--arch/m32r/m32104ut/defconfig.m32104ut1
-rw-r--r--arch/ppc/configs/ev64260_defconfig1
-rw-r--r--arch/ppc/configs/mpc8540_ads_defconfig1
-rw-r--r--arch/ppc/configs/mpc8548_cds_defconfig1
-rw-r--r--arch/ppc/configs/mpc8555_cds_defconfig1
-rw-r--r--arch/ppc/configs/mpc8560_ads_defconfig1
-rw-r--r--arch/ppc/configs/radstone_ppc7d_defconfig1
-rw-r--r--arch/ppc/configs/stx_gp3_defconfig1
-rw-r--r--arch/ppc/configs/sycamore_defconfig1
-rw-r--r--drivers/i2c/busses/Kconfig3
-rw-r--r--drivers/i2c/busses/Makefile1
-rw-r--r--drivers/i2c/busses/i2c-isa.c192
-rw-r--r--drivers/i2c/i2c-core.c2
-rw-r--r--include/linux/i2c-isa.h36
-rw-r--r--include/linux/i2c.h1
23 files changed, 0 insertions, 260 deletions
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
index 7d3f205b0ba5..df1d62001227 100644
--- a/Documentation/feature-removal-schedule.txt
+++ b/Documentation/feature-removal-schedule.txt
@@ -181,15 +181,6 @@ Who: Kay Sievers <kay.sievers@suse.de>
181 181
182--------------------------- 182---------------------------
183 183
184What: i2c-isa
185When: December 2006
186Why: i2c-isa is a non-sense and doesn't fit in the device driver
187 model. Drivers relying on it are better implemented as platform
188 drivers.
189Who: Jean Delvare <khali@linux-fr.org>
190
191---------------------------
192
193What: i2c_adapter.list 184What: i2c_adapter.list
194When: July 2007 185When: July 2007
195Why: Superfluous, this list duplicates the one maintained by the driver 186Why: Superfluous, this list duplicates the one maintained by the driver
diff --git a/arch/arm/configs/badge4_defconfig b/arch/arm/configs/badge4_defconfig
index 821865f75605..b2bbf217c707 100644
--- a/arch/arm/configs/badge4_defconfig
+++ b/arch/arm/configs/badge4_defconfig
@@ -708,7 +708,6 @@ CONFIG_I2C_ALGOPCF=m
708# I2C Hardware Bus support 708# I2C Hardware Bus support
709# 709#
710CONFIG_I2C_ELEKTOR=m 710CONFIG_I2C_ELEKTOR=m
711# CONFIG_I2C_ISA is not set
712# CONFIG_I2C_PARPORT is not set 711# CONFIG_I2C_PARPORT is not set
713# CONFIG_I2C_PARPORT_LIGHT is not set 712# CONFIG_I2C_PARPORT_LIGHT is not set
714# CONFIG_I2C_STUB is not set 713# CONFIG_I2C_STUB is not set
diff --git a/arch/arm/configs/clps7500_defconfig b/arch/arm/configs/clps7500_defconfig
index af9ae5389131..49e9f9d8b3d1 100644
--- a/arch/arm/configs/clps7500_defconfig
+++ b/arch/arm/configs/clps7500_defconfig
@@ -536,7 +536,6 @@ CONFIG_I2C_ALGOBIT=y
536# I2C Hardware Bus support 536# I2C Hardware Bus support
537# 537#
538# CONFIG_I2C_ELEKTOR is not set 538# CONFIG_I2C_ELEKTOR is not set
539# CONFIG_I2C_ISA is not set
540# CONFIG_I2C_PARPORT is not set 539# CONFIG_I2C_PARPORT is not set
541# CONFIG_I2C_PARPORT_LIGHT is not set 540# CONFIG_I2C_PARPORT_LIGHT is not set
542# CONFIG_I2C_PCA_ISA is not set 541# CONFIG_I2C_PCA_ISA is not set
diff --git a/arch/arm/configs/footbridge_defconfig b/arch/arm/configs/footbridge_defconfig
index 2a612d23120b..299dc22294a0 100644
--- a/arch/arm/configs/footbridge_defconfig
+++ b/arch/arm/configs/footbridge_defconfig
@@ -748,7 +748,6 @@ CONFIG_I2C=m
748# CONFIG_I2C_ELEKTOR is not set 748# CONFIG_I2C_ELEKTOR is not set
749# CONFIG_I2C_I801 is not set 749# CONFIG_I2C_I801 is not set
750# CONFIG_I2C_I810 is not set 750# CONFIG_I2C_I810 is not set
751# CONFIG_I2C_ISA is not set
752# CONFIG_I2C_NFORCE2 is not set 751# CONFIG_I2C_NFORCE2 is not set
753# CONFIG_I2C_PARPORT is not set 752# CONFIG_I2C_PARPORT is not set
754# CONFIG_I2C_PARPORT_LIGHT is not set 753# CONFIG_I2C_PARPORT_LIGHT is not set
diff --git a/arch/arm/configs/neponset_defconfig b/arch/arm/configs/neponset_defconfig
index e86794a10fc0..92ccdc6492f7 100644
--- a/arch/arm/configs/neponset_defconfig
+++ b/arch/arm/configs/neponset_defconfig
@@ -698,7 +698,6 @@ CONFIG_I2C_ALGOBIT=y
698# I2C Hardware Bus support 698# I2C Hardware Bus support
699# 699#
700# CONFIG_I2C_ELEKTOR is not set 700# CONFIG_I2C_ELEKTOR is not set
701# CONFIG_I2C_ISA is not set
702# CONFIG_I2C_PARPORT_LIGHT is not set 701# CONFIG_I2C_PARPORT_LIGHT is not set
703# CONFIG_I2C_STUB is not set 702# CONFIG_I2C_STUB is not set
704# CONFIG_I2C_PCA_ISA is not set 703# CONFIG_I2C_PCA_ISA is not set
diff --git a/arch/arm/configs/picotux200_defconfig b/arch/arm/configs/picotux200_defconfig
index 339c48953a62..3c0c4f192dc1 100644
--- a/arch/arm/configs/picotux200_defconfig
+++ b/arch/arm/configs/picotux200_defconfig
@@ -735,7 +735,6 @@ CONFIG_I2C_CHARDEV=m
735# I2C Hardware Bus support 735# I2C Hardware Bus support
736# 736#
737CONFIG_I2C_AT91=m 737CONFIG_I2C_AT91=m
738CONFIG_I2C_ISA=m
739# CONFIG_I2C_OCORES is not set 738# CONFIG_I2C_OCORES is not set
740# CONFIG_I2C_PARPORT_LIGHT is not set 739# CONFIG_I2C_PARPORT_LIGHT is not set
741# CONFIG_I2C_STUB is not set 740# CONFIG_I2C_STUB is not set
diff --git a/arch/arm/configs/rpc_defconfig b/arch/arm/configs/rpc_defconfig
index bc091264d354..8452dc8c7cc3 100644
--- a/arch/arm/configs/rpc_defconfig
+++ b/arch/arm/configs/rpc_defconfig
@@ -558,7 +558,6 @@ CONFIG_I2C_ALGOBIT=y
558# 558#
559# I2C Hardware Bus support 559# I2C Hardware Bus support
560# 560#
561# CONFIG_I2C_ISA is not set
562# CONFIG_I2C_PARPORT is not set 561# CONFIG_I2C_PARPORT is not set
563# CONFIG_I2C_PARPORT_LIGHT is not set 562# CONFIG_I2C_PARPORT_LIGHT is not set
564# CONFIG_I2C_STUB is not set 563# CONFIG_I2C_STUB is not set
diff --git a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig
index a850da377a29..1d5150e4d6b3 100644
--- a/arch/arm/configs/s3c2410_defconfig
+++ b/arch/arm/configs/s3c2410_defconfig
@@ -826,7 +826,6 @@ CONFIG_I2C_ALGOBIT=m
826# I2C Hardware Bus support 826# I2C Hardware Bus support
827# 827#
828# CONFIG_I2C_ELEKTOR is not set 828# CONFIG_I2C_ELEKTOR is not set
829CONFIG_I2C_ISA=m
830# CONFIG_I2C_OCORES is not set 829# CONFIG_I2C_OCORES is not set
831# CONFIG_I2C_PARPORT is not set 830# CONFIG_I2C_PARPORT is not set
832# CONFIG_I2C_PARPORT_LIGHT is not set 831# CONFIG_I2C_PARPORT_LIGHT is not set
diff --git a/arch/m32r/m32104ut/defconfig.m32104ut b/arch/m32r/m32104ut/defconfig.m32104ut
index 7b68fe8d921e..1f88f493a9e2 100644
--- a/arch/m32r/m32104ut/defconfig.m32104ut
+++ b/arch/m32r/m32104ut/defconfig.m32104ut
@@ -699,7 +699,6 @@ CONFIG_I2C_ALGOPCF=m
699# I2C Hardware Bus support 699# I2C Hardware Bus support
700# 700#
701CONFIG_I2C_ELEKTOR=m 701CONFIG_I2C_ELEKTOR=m
702CONFIG_I2C_ISA=m
703# CONFIG_I2C_OCORES is not set 702# CONFIG_I2C_OCORES is not set
704# CONFIG_I2C_PARPORT is not set 703# CONFIG_I2C_PARPORT is not set
705# CONFIG_I2C_PARPORT_LIGHT is not set 704# CONFIG_I2C_PARPORT_LIGHT is not set
diff --git a/arch/ppc/configs/ev64260_defconfig b/arch/ppc/configs/ev64260_defconfig
index 84cc142a67bb..587e9a3b9491 100644
--- a/arch/ppc/configs/ev64260_defconfig
+++ b/arch/ppc/configs/ev64260_defconfig
@@ -531,7 +531,6 @@ CONFIG_I2C_CHARDEV=m
531# CONFIG_I2C_AMD8111 is not set 531# CONFIG_I2C_AMD8111 is not set
532# CONFIG_I2C_I801 is not set 532# CONFIG_I2C_I801 is not set
533# CONFIG_I2C_I810 is not set 533# CONFIG_I2C_I810 is not set
534# CONFIG_I2C_ISA is not set
535# CONFIG_I2C_NFORCE2 is not set 534# CONFIG_I2C_NFORCE2 is not set
536# CONFIG_I2C_PARPORT_LIGHT is not set 535# CONFIG_I2C_PARPORT_LIGHT is not set
537# CONFIG_I2C_PIIX4 is not set 536# CONFIG_I2C_PIIX4 is not set
diff --git a/arch/ppc/configs/mpc8540_ads_defconfig b/arch/ppc/configs/mpc8540_ads_defconfig
index c5c86025e261..bf676ebd99ab 100644
--- a/arch/ppc/configs/mpc8540_ads_defconfig
+++ b/arch/ppc/configs/mpc8540_ads_defconfig
@@ -452,7 +452,6 @@ CONFIG_I2C_CHARDEV=y
452# CONFIG_I2C_AMD8111 is not set 452# CONFIG_I2C_AMD8111 is not set
453# CONFIG_I2C_I801 is not set 453# CONFIG_I2C_I801 is not set
454# CONFIG_I2C_I810 is not set 454# CONFIG_I2C_I810 is not set
455# CONFIG_I2C_ISA is not set
456CONFIG_I2C_MPC=y 455CONFIG_I2C_MPC=y
457# CONFIG_I2C_NFORCE2 is not set 456# CONFIG_I2C_NFORCE2 is not set
458# CONFIG_I2C_PARPORT_LIGHT is not set 457# CONFIG_I2C_PARPORT_LIGHT is not set
diff --git a/arch/ppc/configs/mpc8548_cds_defconfig b/arch/ppc/configs/mpc8548_cds_defconfig
index abe034f24b83..f36fc5db540b 100644
--- a/arch/ppc/configs/mpc8548_cds_defconfig
+++ b/arch/ppc/configs/mpc8548_cds_defconfig
@@ -413,7 +413,6 @@ CONFIG_I2C_CHARDEV=y
413# 413#
414# I2C Hardware Bus support 414# I2C Hardware Bus support
415# 415#
416# CONFIG_I2C_ISA is not set
417CONFIG_I2C_MPC=y 416CONFIG_I2C_MPC=y
418# CONFIG_I2C_PARPORT_LIGHT is not set 417# CONFIG_I2C_PARPORT_LIGHT is not set
419# CONFIG_I2C_PCA_ISA is not set 418# CONFIG_I2C_PCA_ISA is not set
diff --git a/arch/ppc/configs/mpc8555_cds_defconfig b/arch/ppc/configs/mpc8555_cds_defconfig
index 15abebf46b96..4f1e320acfbe 100644
--- a/arch/ppc/configs/mpc8555_cds_defconfig
+++ b/arch/ppc/configs/mpc8555_cds_defconfig
@@ -518,7 +518,6 @@ CONFIG_I2C_CHARDEV=y
518# CONFIG_I2C_I801 is not set 518# CONFIG_I2C_I801 is not set
519# CONFIG_I2C_I810 is not set 519# CONFIG_I2C_I810 is not set
520# CONFIG_I2C_PIIX4 is not set 520# CONFIG_I2C_PIIX4 is not set
521# CONFIG_I2C_ISA is not set
522CONFIG_I2C_MPC=y 521CONFIG_I2C_MPC=y
523# CONFIG_I2C_NFORCE2 is not set 522# CONFIG_I2C_NFORCE2 is not set
524# CONFIG_I2C_PARPORT_LIGHT is not set 523# CONFIG_I2C_PARPORT_LIGHT is not set
diff --git a/arch/ppc/configs/mpc8560_ads_defconfig b/arch/ppc/configs/mpc8560_ads_defconfig
index f834fb541ad5..f12d48fcbba7 100644
--- a/arch/ppc/configs/mpc8560_ads_defconfig
+++ b/arch/ppc/configs/mpc8560_ads_defconfig
@@ -489,7 +489,6 @@ CONFIG_I2C_CHARDEV=y
489# CONFIG_I2C_I801 is not set 489# CONFIG_I2C_I801 is not set
490# CONFIG_I2C_I810 is not set 490# CONFIG_I2C_I810 is not set
491# CONFIG_I2C_PIIX4 is not set 491# CONFIG_I2C_PIIX4 is not set
492# CONFIG_I2C_ISA is not set
493CONFIG_I2C_MPC=y 492CONFIG_I2C_MPC=y
494# CONFIG_I2C_NFORCE2 is not set 493# CONFIG_I2C_NFORCE2 is not set
495# CONFIG_I2C_PARPORT_LIGHT is not set 494# CONFIG_I2C_PARPORT_LIGHT is not set
diff --git a/arch/ppc/configs/radstone_ppc7d_defconfig b/arch/ppc/configs/radstone_ppc7d_defconfig
index ca4d1fd0ca05..9f64532f2a81 100644
--- a/arch/ppc/configs/radstone_ppc7d_defconfig
+++ b/arch/ppc/configs/radstone_ppc7d_defconfig
@@ -710,7 +710,6 @@ CONFIG_I2C_CHARDEV=y
710# CONFIG_I2C_I801 is not set 710# CONFIG_I2C_I801 is not set
711# CONFIG_I2C_I810 is not set 711# CONFIG_I2C_I810 is not set
712# CONFIG_I2C_PIIX4 is not set 712# CONFIG_I2C_PIIX4 is not set
713# CONFIG_I2C_ISA is not set
714# CONFIG_I2C_MPC is not set 713# CONFIG_I2C_MPC is not set
715# CONFIG_I2C_NFORCE2 is not set 714# CONFIG_I2C_NFORCE2 is not set
716# CONFIG_I2C_PARPORT_LIGHT is not set 715# CONFIG_I2C_PARPORT_LIGHT is not set
diff --git a/arch/ppc/configs/stx_gp3_defconfig b/arch/ppc/configs/stx_gp3_defconfig
index 3fedc43e44ad..70d6f842aa9b 100644
--- a/arch/ppc/configs/stx_gp3_defconfig
+++ b/arch/ppc/configs/stx_gp3_defconfig
@@ -661,7 +661,6 @@ CONFIG_I2C_ALGOBIT=m
661# CONFIG_I2C_I801 is not set 661# CONFIG_I2C_I801 is not set
662# CONFIG_I2C_I810 is not set 662# CONFIG_I2C_I810 is not set
663# CONFIG_I2C_PIIX4 is not set 663# CONFIG_I2C_PIIX4 is not set
664# CONFIG_I2C_ISA is not set
665# CONFIG_I2C_MPC is not set 664# CONFIG_I2C_MPC is not set
666# CONFIG_I2C_NFORCE2 is not set 665# CONFIG_I2C_NFORCE2 is not set
667# CONFIG_I2C_PARPORT is not set 666# CONFIG_I2C_PARPORT is not set
diff --git a/arch/ppc/configs/sycamore_defconfig b/arch/ppc/configs/sycamore_defconfig
index 758114cfea5c..6996cca18f3e 100644
--- a/arch/ppc/configs/sycamore_defconfig
+++ b/arch/ppc/configs/sycamore_defconfig
@@ -461,7 +461,6 @@ CONFIG_I2C_CHARDEV=y
461# CONFIG_I2C_I801 is not set 461# CONFIG_I2C_I801 is not set
462# CONFIG_I2C_I810 is not set 462# CONFIG_I2C_I810 is not set
463# CONFIG_I2C_IBM_IIC is not set 463# CONFIG_I2C_IBM_IIC is not set
464# CONFIG_I2C_ISA is not set
465# CONFIG_I2C_NFORCE2 is not set 464# CONFIG_I2C_NFORCE2 is not set
466# CONFIG_I2C_PARPORT_LIGHT is not set 465# CONFIG_I2C_PARPORT_LIGHT is not set
467# CONFIG_I2C_PIIX4 is not set 466# CONFIG_I2C_PIIX4 is not set
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 838dc1c19d61..c63bfa68e144 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -236,9 +236,6 @@ config I2C_IOP3XX
236 This driver can also be built as a module. If so, the module 236 This driver can also be built as a module. If so, the module
237 will be called i2c-iop3xx. 237 will be called i2c-iop3xx.
238 238
239config I2C_ISA
240 tristate
241
242config I2C_IXP4XX 239config I2C_IXP4XX
243 tristate "IXP4xx GPIO-Based I2C Interface (DEPRECATED)" 240 tristate "IXP4xx GPIO-Based I2C Interface (DEPRECATED)"
244 depends on ARCH_IXP4XX 241 depends on ARCH_IXP4XX
diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile
index 14d1432f698b..b6a8037f1feb 100644
--- a/drivers/i2c/busses/Makefile
+++ b/drivers/i2c/busses/Makefile
@@ -18,7 +18,6 @@ obj-$(CONFIG_I2C_I801) += i2c-i801.o
18obj-$(CONFIG_I2C_I810) += i2c-i810.o 18obj-$(CONFIG_I2C_I810) += i2c-i810.o
19obj-$(CONFIG_I2C_IBM_IIC) += i2c-ibm_iic.o 19obj-$(CONFIG_I2C_IBM_IIC) += i2c-ibm_iic.o
20obj-$(CONFIG_I2C_IOP3XX) += i2c-iop3xx.o 20obj-$(CONFIG_I2C_IOP3XX) += i2c-iop3xx.o
21obj-$(CONFIG_I2C_ISA) += i2c-isa.o
22obj-$(CONFIG_I2C_IXP2000) += i2c-ixp2000.o 21obj-$(CONFIG_I2C_IXP2000) += i2c-ixp2000.o
23obj-$(CONFIG_I2C_IXP4XX) += i2c-ixp4xx.o 22obj-$(CONFIG_I2C_IXP4XX) += i2c-ixp4xx.o
24obj-$(CONFIG_I2C_POWERMAC) += i2c-powermac.o 23obj-$(CONFIG_I2C_POWERMAC) += i2c-powermac.o
diff --git a/drivers/i2c/busses/i2c-isa.c b/drivers/i2c/busses/i2c-isa.c
deleted file mode 100644
index b0e1370075de..000000000000
--- a/drivers/i2c/busses/i2c-isa.c
+++ /dev/null
@@ -1,192 +0,0 @@
1/*
2 i2c-isa.c - an i2c-core-like thing for ISA hardware monitoring chips
3 Copyright (C) 2005 Jean Delvare <khali@linux-fr.org>
4
5 Based on the i2c-isa pseudo-adapter from the lm_sensors project
6 Copyright (c) 1998, 1999 Frodo Looijaard <frodol@dds.nl>
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21*/
22
23/* This implements an i2c-core-like thing for ISA hardware monitoring
24 chips. Such chips are linked to the i2c subsystem for historical
25 reasons (because the early ISA hardware monitoring chips such as the
26 LM78 had both an I2C and an ISA interface). They used to be
27 registered with the main i2c-core, but as a first step in the
28 direction of a clean separation between I2C and ISA chip drivers,
29 we now have this separate core for ISA ones. It is significantly
30 more simple than the real one, of course, because we don't have to
31 handle multiple busses: there is only one (fake) ISA adapter.
32 It is worth noting that we still rely on i2c-core for some things
33 at the moment - but hopefully this won't last. */
34
35#include <linux/init.h>
36#include <linux/module.h>
37#include <linux/kernel.h>
38#include <linux/errno.h>
39#include <linux/i2c.h>
40#include <linux/i2c-isa.h>
41#include <linux/platform_device.h>
42#include <linux/completion.h>
43
44/* Exported by i2c-core for i2c-isa only */
45extern void i2c_adapter_dev_release(struct device *dev);
46extern struct class i2c_adapter_class;
47
48static u32 isa_func(struct i2c_adapter *adapter);
49
50/* This is the actual algorithm we define */
51static const struct i2c_algorithm isa_algorithm = {
52 .functionality = isa_func,
53};
54
55/* There can only be one... */
56static struct i2c_adapter isa_adapter = {
57 .owner = THIS_MODULE,
58 .id = I2C_HW_ISA,
59 .class = I2C_CLASS_HWMON,
60 .algo = &isa_algorithm,
61 .name = "ISA main adapter",
62};
63
64/* We can't do a thing... */
65static u32 isa_func(struct i2c_adapter *adapter)
66{
67 return 0;
68}
69
70
71/* We implement an interface which resembles i2c_{add,del}_driver,
72 but for i2c-isa drivers. We don't have to remember and handle lists
73 of drivers and adapters so this is much more simple, of course. */
74
75int i2c_isa_add_driver(struct i2c_driver *driver)
76{
77 int res;
78
79 /* Add the driver to the list of i2c drivers in the driver core */
80 driver->driver.bus = &i2c_bus_type;
81 res = driver_register(&driver->driver);
82 if (res)
83 return res;
84 dev_dbg(&isa_adapter.dev, "Driver %s registered\n", driver->driver.name);
85
86 /* Now look for clients */
87 res = driver->attach_adapter(&isa_adapter);
88 if (res) {
89 dev_dbg(&isa_adapter.dev,
90 "Driver %s failed to attach adapter, unregistering\n",
91 driver->driver.name);
92 driver_unregister(&driver->driver);
93 }
94 return res;
95}
96
97int i2c_isa_del_driver(struct i2c_driver *driver)
98{
99 struct list_head *item, *_n;
100 struct i2c_client *client;
101 int res;
102
103 /* Detach all clients belonging to this one driver */
104 list_for_each_safe(item, _n, &isa_adapter.clients) {
105 client = list_entry(item, struct i2c_client, list);
106 if (client->driver != driver)
107 continue;
108 dev_dbg(&isa_adapter.dev, "Detaching client %s at 0x%x\n",
109 client->name, client->addr);
110 if ((res = driver->detach_client(client))) {
111 dev_err(&isa_adapter.dev, "Failed, driver "
112 "%s not unregistered!\n",
113 driver->driver.name);
114 return res;
115 }
116 }
117
118 /* Get the driver off the core list */
119 driver_unregister(&driver->driver);
120 dev_dbg(&isa_adapter.dev, "Driver %s unregistered\n", driver->driver.name);
121
122 return 0;
123}
124
125
126static int __init i2c_isa_init(void)
127{
128 int err;
129
130 mutex_init(&isa_adapter.clist_lock);
131 INIT_LIST_HEAD(&isa_adapter.clients);
132
133 isa_adapter.nr = ANY_I2C_ISA_BUS;
134 isa_adapter.dev.parent = &platform_bus;
135 sprintf(isa_adapter.dev.bus_id, "i2c-%d", isa_adapter.nr);
136 isa_adapter.dev.release = &i2c_adapter_dev_release;
137 isa_adapter.dev.class = &i2c_adapter_class;
138 err = device_register(&isa_adapter.dev);
139 if (err) {
140 printk(KERN_ERR "i2c-isa: Failed to register device\n");
141 goto exit;
142 }
143
144 dev_dbg(&isa_adapter.dev, "%s registered\n", isa_adapter.name);
145
146 return 0;
147
148exit:
149 return err;
150}
151
152static void __exit i2c_isa_exit(void)
153{
154#ifdef DEBUG
155 struct list_head *item, *_n;
156 struct i2c_client *client = NULL;
157#endif
158
159 /* There should be no more active client */
160#ifdef DEBUG
161 dev_dbg(&isa_adapter.dev, "Looking for clients\n");
162 list_for_each_safe(item, _n, &isa_adapter.clients) {
163 client = list_entry(item, struct i2c_client, list);
164 dev_err(&isa_adapter.dev, "Driver %s still has an active "
165 "ISA client at 0x%x\n", client->driver->driver.name,
166 client->addr);
167 }
168 if (client != NULL)
169 return;
170#endif
171
172 /* Clean up the sysfs representation */
173 dev_dbg(&isa_adapter.dev, "Unregistering from sysfs\n");
174 init_completion(&isa_adapter.dev_released);
175 device_unregister(&isa_adapter.dev);
176
177 /* Wait for sysfs to drop all references */
178 dev_dbg(&isa_adapter.dev, "Waiting for sysfs completion\n");
179 wait_for_completion(&isa_adapter.dev_released);
180
181 dev_dbg(&isa_adapter.dev, "%s unregistered\n", isa_adapter.name);
182}
183
184EXPORT_SYMBOL(i2c_isa_add_driver);
185EXPORT_SYMBOL(i2c_isa_del_driver);
186
187MODULE_AUTHOR("Jean Delvare <khali@linux-fr.org>");
188MODULE_DESCRIPTION("ISA bus access through i2c");
189MODULE_LICENSE("GPL");
190
191module_init(i2c_isa_init);
192module_exit(i2c_isa_exit);
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 435925eba437..931f34592be9 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -286,7 +286,6 @@ void i2c_adapter_dev_release(struct device *dev)
286 struct i2c_adapter *adap = to_i2c_adapter(dev); 286 struct i2c_adapter *adap = to_i2c_adapter(dev);
287 complete(&adap->dev_released); 287 complete(&adap->dev_released);
288} 288}
289EXPORT_SYMBOL_GPL(i2c_adapter_dev_release); /* exported to i2c-isa */
290 289
291static ssize_t 290static ssize_t
292show_adapter_name(struct device *dev, struct device_attribute *attr, char *buf) 291show_adapter_name(struct device *dev, struct device_attribute *attr, char *buf)
@@ -305,7 +304,6 @@ struct class i2c_adapter_class = {
305 .name = "i2c-adapter", 304 .name = "i2c-adapter",
306 .dev_attrs = i2c_adapter_attrs, 305 .dev_attrs = i2c_adapter_attrs,
307}; 306};
308EXPORT_SYMBOL_GPL(i2c_adapter_class); /* exported to i2c-isa */
309 307
310static void i2c_scan_static_board_info(struct i2c_adapter *adapter) 308static void i2c_scan_static_board_info(struct i2c_adapter *adapter)
311{ 309{
diff --git a/include/linux/i2c-isa.h b/include/linux/i2c-isa.h
deleted file mode 100644
index 67e3598c4cec..000000000000
--- a/include/linux/i2c-isa.h
+++ /dev/null
@@ -1,36 +0,0 @@
1/*
2 * i2c-isa.h - definitions for the i2c-isa pseudo-i2c-adapter interface
3 *
4 * Copyright (C) 2005 Jean Delvare <khali@linux-fr.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 */
20
21#ifndef _LINUX_I2C_ISA_H
22#define _LINUX_I2C_ISA_H
23
24#include <linux/i2c.h>
25
26extern int i2c_isa_add_driver(struct i2c_driver *driver);
27extern int i2c_isa_del_driver(struct i2c_driver *driver);
28
29/* Detect whether we are on the isa bus. This is only useful to hybrid
30 (i2c+isa) drivers. */
31#define i2c_is_isa_adapter(adapptr) \
32 ((adapptr)->id == I2C_HW_ISA)
33#define i2c_is_isa_client(clientptr) \
34 i2c_is_isa_adapter((clientptr)->adapter)
35
36#endif /* _LINUX_I2C_ISA_H */
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index cae7d618030c..47f40376a3c7 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -362,7 +362,6 @@ struct i2c_client_address_data {
362 362
363/* The numbers to use to set I2C bus address */ 363/* The numbers to use to set I2C bus address */
364#define ANY_I2C_BUS 0xffff 364#define ANY_I2C_BUS 0xffff
365#define ANY_I2C_ISA_BUS 9191
366 365
367 366
368/* ----- functions exported by i2c.o */ 367/* ----- functions exported by i2c.o */