aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-28 17:12:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-28 17:12:15 -0400
commitd2a2fc18d98d8ee2dec1542efc7f47beec256144 (patch)
treedba9097631b9736845920bc4029cc865071b8c65
parent7bf97e1d5a94b6a71815771bb9452fc2c022c966 (diff)
parent41101a33026c215a09e5d3549aedfcdae9105515 (diff)
Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging
Pull i2c updates from Jean Delvare. Fix up trivial conflict in drivers/i2c/busses/i2c-gpio.c due to include file cleanup clashing with DT support addition (which did the same cleanup) * 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: i2c-algo-bit: Don't resched on clock stretching i2c: Update the FSF address i2c: Convert drivers/i2c/muxes/* to use module_i2c_driver() i2c-i801: Use usleep_range to wait for command completion i2c-i801: Add device IDs for Intel Lynx Point i2c-isch: Decrease delay in command completion check loop i2c-gpio: Use linux/gpio.h rather than asm/gpio.h
-rw-r--r--Documentation/i2c/busses/i2c-i8011
-rw-r--r--drivers/i2c/algos/i2c-algo-bit.c5
-rw-r--r--drivers/i2c/algos/i2c-algo-pca.c3
-rw-r--r--drivers/i2c/algos/i2c-algo-pcf.c3
-rw-r--r--drivers/i2c/algos/i2c-algo-pcf.h3
-rw-r--r--drivers/i2c/busses/Kconfig1
-rw-r--r--drivers/i2c/busses/i2c-i801.c27
-rw-r--r--drivers/i2c/busses/i2c-isch.c10
-rw-r--r--drivers/i2c/i2c-boardinfo.c3
-rw-r--r--drivers/i2c/i2c-core.c3
-rw-r--r--drivers/i2c/i2c-core.h3
-rw-r--r--drivers/i2c/i2c-dev.c3
-rw-r--r--drivers/i2c/i2c-smbus.c3
-rw-r--r--drivers/i2c/muxes/pca9541.c13
-rw-r--r--drivers/i2c/muxes/pca954x.c13
-rw-r--r--include/linux/i2c-algo-bit.h3
-rw-r--r--include/linux/i2c-algo-pcf.h3
-rw-r--r--include/linux/i2c-dev.h3
-rw-r--r--include/linux/i2c-mux.h3
-rw-r--r--include/linux/i2c-smbus.h3
-rw-r--r--include/linux/i2c.h3
21 files changed, 55 insertions, 57 deletions
diff --git a/Documentation/i2c/busses/i2c-i801 b/Documentation/i2c/busses/i2c-i801
index 2871fd500349..71f55bbcefc8 100644
--- a/Documentation/i2c/busses/i2c-i801
+++ b/Documentation/i2c/busses/i2c-i801
@@ -20,6 +20,7 @@ Supported adapters:
20 * Intel Patsburg (PCH) 20 * Intel Patsburg (PCH)
21 * Intel DH89xxCC (PCH) 21 * Intel DH89xxCC (PCH)
22 * Intel Panther Point (PCH) 22 * Intel Panther Point (PCH)
23 * Intel Lynx Point (PCH)
23 Datasheets: Publicly available at the Intel website 24 Datasheets: Publicly available at the Intel website
24 25
25On Intel Patsburg and later chipsets, both the normal host SMBus controller 26On Intel Patsburg and later chipsets, both the normal host SMBus controller
diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c
index acba1c686c65..7f0b83219744 100644
--- a/drivers/i2c/algos/i2c-algo-bit.c
+++ b/drivers/i2c/algos/i2c-algo-bit.c
@@ -15,7 +15,8 @@
15 15
16 You should have received a copy of the GNU General Public License 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 17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 MA 02110-1301 USA.
19 * ------------------------------------------------------------------------- */ 20 * ------------------------------------------------------------------------- */
20 21
21/* With some changes from Frodo Looijaard <frodol@dds.nl>, Kyösti Mälkki 22/* With some changes from Frodo Looijaard <frodol@dds.nl>, Kyösti Mälkki
@@ -111,7 +112,7 @@ static int sclhi(struct i2c_algo_bit_data *adap)
111 break; 112 break;
112 return -ETIMEDOUT; 113 return -ETIMEDOUT;
113 } 114 }
114 cond_resched(); 115 cpu_relax();
115 } 116 }
116#ifdef DEBUG 117#ifdef DEBUG
117 if (jiffies != start && i2c_debug >= 3) 118 if (jiffies != start && i2c_debug >= 3)
diff --git a/drivers/i2c/algos/i2c-algo-pca.c b/drivers/i2c/algos/i2c-algo-pca.c
index beb9ffe2564b..73133b1063f0 100644
--- a/drivers/i2c/algos/i2c-algo-pca.c
+++ b/drivers/i2c/algos/i2c-algo-pca.c
@@ -15,7 +15,8 @@
15 * 15 *
16 * You should have received a copy of the GNU General Public License 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 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301 USA.
19 */ 20 */
20 21
21#include <linux/kernel.h> 22#include <linux/kernel.h>
diff --git a/drivers/i2c/algos/i2c-algo-pcf.c b/drivers/i2c/algos/i2c-algo-pcf.c
index 5eebf562ff31..5c2379522aa9 100644
--- a/drivers/i2c/algos/i2c-algo-pcf.c
+++ b/drivers/i2c/algos/i2c-algo-pcf.c
@@ -16,7 +16,8 @@
16 * 16 *
17 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20 * MA 02110-1301 USA.
20 * 21 *
21 * With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and 22 * With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and
22 * Frodo Looijaard <frodol@dds.nl>, and also from Martin Bailey 23 * Frodo Looijaard <frodol@dds.nl>, and also from Martin Bailey
diff --git a/drivers/i2c/algos/i2c-algo-pcf.h b/drivers/i2c/algos/i2c-algo-pcf.h
index 5263a9eeb8d7..1ec703ee788d 100644
--- a/drivers/i2c/algos/i2c-algo-pcf.h
+++ b/drivers/i2c/algos/i2c-algo-pcf.h
@@ -16,7 +16,8 @@
16 16
17 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software 18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20 MA 02110-1301 USA. */
20/* -------------------------------------------------------------------- */ 21/* -------------------------------------------------------------------- */
21 22
22/* With some changes from Frodo Looijaard <frodol@dds.nl> */ 23/* With some changes from Frodo Looijaard <frodol@dds.nl> */
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
index 71c1b0a7535c..d2c5095deeac 100644
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -103,6 +103,7 @@ config I2C_I801
103 Patsburg (PCH) 103 Patsburg (PCH)
104 DH89xxCC (PCH) 104 DH89xxCC (PCH)
105 Panther Point (PCH) 105 Panther Point (PCH)
106 Lynx Point (PCH)
106 107
107 This driver can also be built as a module. If so, the module 108 This driver can also be built as a module. If so, the module
108 will be called i2c-i801. 109 will be called i2c-i801.
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c
index 5d2e2816831f..ae2945a5e007 100644
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -2,7 +2,7 @@
2 Copyright (c) 1998 - 2002 Frodo Looijaard <frodol@dds.nl>, 2 Copyright (c) 1998 - 2002 Frodo Looijaard <frodol@dds.nl>,
3 Philip Edelbrock <phil@netroedge.com>, and Mark D. Studebaker 3 Philip Edelbrock <phil@netroedge.com>, and Mark D. Studebaker
4 <mdsxyz123@yahoo.com> 4 <mdsxyz123@yahoo.com>
5 Copyright (C) 2007, 2008 Jean Delvare <khali@linux-fr.org> 5 Copyright (C) 2007 - 2012 Jean Delvare <khali@linux-fr.org>
6 Copyright (C) 2010 Intel Corporation, 6 Copyright (C) 2010 Intel Corporation,
7 David Woodhouse <dwmw2@infradead.org> 7 David Woodhouse <dwmw2@infradead.org>
8 8
@@ -51,6 +51,7 @@
51 Patsburg (PCH) IDF 0x1d72 32 hard yes yes yes 51 Patsburg (PCH) IDF 0x1d72 32 hard yes yes yes
52 DH89xxCC (PCH) 0x2330 32 hard yes yes yes 52 DH89xxCC (PCH) 0x2330 32 hard yes yes yes
53 Panther Point (PCH) 0x1e22 32 hard yes yes yes 53 Panther Point (PCH) 0x1e22 32 hard yes yes yes
54 Lynx Point (PCH) 0x8c22 32 hard yes yes yes
54 55
55 Features supported by this driver: 56 Features supported by this driver:
56 Software PEC no 57 Software PEC no
@@ -105,7 +106,7 @@
105#define SMBHSTCNT_KILL 2 106#define SMBHSTCNT_KILL 2
106 107
107/* Other settings */ 108/* Other settings */
108#define MAX_TIMEOUT 100 109#define MAX_RETRIES 400
109#define ENABLE_INT9 0 /* set to 0x01 to enable - untested */ 110#define ENABLE_INT9 0 /* set to 0x01 to enable - untested */
110 111
111/* I801 command constants */ 112/* I801 command constants */
@@ -145,6 +146,7 @@
145#define PCI_DEVICE_ID_INTEL_PANTHERPOINT_SMBUS 0x1e22 146#define PCI_DEVICE_ID_INTEL_PANTHERPOINT_SMBUS 0x1e22
146#define PCI_DEVICE_ID_INTEL_DH89XXCC_SMBUS 0x2330 147#define PCI_DEVICE_ID_INTEL_DH89XXCC_SMBUS 0x2330
147#define PCI_DEVICE_ID_INTEL_5_3400_SERIES_SMBUS 0x3b30 148#define PCI_DEVICE_ID_INTEL_5_3400_SERIES_SMBUS 0x3b30
149#define PCI_DEVICE_ID_INTEL_LYNXPOINT_SMBUS 0x8c22
148 150
149struct i801_priv { 151struct i801_priv {
150 struct i2c_adapter adapter; 152 struct i2c_adapter adapter;
@@ -215,7 +217,7 @@ static int i801_check_post(struct i801_priv *priv, int status, int timeout)
215 dev_dbg(&priv->pci_dev->dev, "Terminating the current operation\n"); 217 dev_dbg(&priv->pci_dev->dev, "Terminating the current operation\n");
216 outb_p(inb_p(SMBHSTCNT(priv)) | SMBHSTCNT_KILL, 218 outb_p(inb_p(SMBHSTCNT(priv)) | SMBHSTCNT_KILL,
217 SMBHSTCNT(priv)); 219 SMBHSTCNT(priv));
218 msleep(1); 220 usleep_range(1000, 2000);
219 outb_p(inb_p(SMBHSTCNT(priv)) & (~SMBHSTCNT_KILL), 221 outb_p(inb_p(SMBHSTCNT(priv)) & (~SMBHSTCNT_KILL),
220 SMBHSTCNT(priv)); 222 SMBHSTCNT(priv));
221 223
@@ -272,11 +274,11 @@ static int i801_transaction(struct i801_priv *priv, int xact)
272 274
273 /* We will always wait for a fraction of a second! */ 275 /* We will always wait for a fraction of a second! */
274 do { 276 do {
275 msleep(1); 277 usleep_range(250, 500);
276 status = inb_p(SMBHSTSTS(priv)); 278 status = inb_p(SMBHSTSTS(priv));
277 } while ((status & SMBHSTSTS_HOST_BUSY) && (timeout++ < MAX_TIMEOUT)); 279 } while ((status & SMBHSTSTS_HOST_BUSY) && (timeout++ < MAX_RETRIES));
278 280
279 result = i801_check_post(priv, status, timeout > MAX_TIMEOUT); 281 result = i801_check_post(priv, status, timeout > MAX_RETRIES);
280 if (result < 0) 282 if (result < 0)
281 return result; 283 return result;
282 284
@@ -291,12 +293,12 @@ static void i801_wait_hwpec(struct i801_priv *priv)
291 int status; 293 int status;
292 294
293 do { 295 do {
294 msleep(1); 296 usleep_range(250, 500);
295 status = inb_p(SMBHSTSTS(priv)); 297 status = inb_p(SMBHSTSTS(priv));
296 } while ((!(status & SMBHSTSTS_INTR)) 298 } while ((!(status & SMBHSTSTS_INTR))
297 && (timeout++ < MAX_TIMEOUT)); 299 && (timeout++ < MAX_RETRIES));
298 300
299 if (timeout > MAX_TIMEOUT) 301 if (timeout > MAX_RETRIES)
300 dev_dbg(&priv->pci_dev->dev, "PEC Timeout!\n"); 302 dev_dbg(&priv->pci_dev->dev, "PEC Timeout!\n");
301 303
302 outb_p(status, SMBHSTSTS(priv)); 304 outb_p(status, SMBHSTSTS(priv));
@@ -380,12 +382,12 @@ static int i801_block_transaction_byte_by_byte(struct i801_priv *priv,
380 /* We will always wait for a fraction of a second! */ 382 /* We will always wait for a fraction of a second! */
381 timeout = 0; 383 timeout = 0;
382 do { 384 do {
383 msleep(1); 385 usleep_range(250, 500);
384 status = inb_p(SMBHSTSTS(priv)); 386 status = inb_p(SMBHSTSTS(priv));
385 } while ((!(status & SMBHSTSTS_BYTE_DONE)) 387 } while ((!(status & SMBHSTSTS_BYTE_DONE))
386 && (timeout++ < MAX_TIMEOUT)); 388 && (timeout++ < MAX_RETRIES));
387 389
388 result = i801_check_post(priv, status, timeout > MAX_TIMEOUT); 390 result = i801_check_post(priv, status, timeout > MAX_RETRIES);
389 if (result < 0) 391 if (result < 0)
390 return result; 392 return result;
391 393
@@ -633,6 +635,7 @@ static DEFINE_PCI_DEVICE_TABLE(i801_ids) = {
633 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF2) }, 635 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF2) },
634 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_DH89XXCC_SMBUS) }, 636 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_DH89XXCC_SMBUS) },
635 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PANTHERPOINT_SMBUS) }, 637 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_PANTHERPOINT_SMBUS) },
638 { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_LYNXPOINT_SMBUS) },
636 { 0, } 639 { 0, }
637}; 640};
638 641
diff --git a/drivers/i2c/busses/i2c-isch.c b/drivers/i2c/busses/i2c-isch.c
index 6561d275b8cf..f90a6057508d 100644
--- a/drivers/i2c/busses/i2c-isch.c
+++ b/drivers/i2c/busses/i2c-isch.c
@@ -47,7 +47,7 @@
47#define SMBBLKDAT (0x20 + sch_smba) 47#define SMBBLKDAT (0x20 + sch_smba)
48 48
49/* Other settings */ 49/* Other settings */
50#define MAX_TIMEOUT 500 50#define MAX_RETRIES 5000
51 51
52/* I2C constants */ 52/* I2C constants */
53#define SCH_QUICK 0x00 53#define SCH_QUICK 0x00
@@ -68,7 +68,7 @@ static int sch_transaction(void)
68{ 68{
69 int temp; 69 int temp;
70 int result = 0; 70 int result = 0;
71 int timeout = 0; 71 int retries = 0;
72 72
73 dev_dbg(&sch_adapter.dev, "Transaction (pre): CNT=%02x, CMD=%02x, " 73 dev_dbg(&sch_adapter.dev, "Transaction (pre): CNT=%02x, CMD=%02x, "
74 "ADD=%02x, DAT0=%02x, DAT1=%02x\n", inb(SMBHSTCNT), 74 "ADD=%02x, DAT0=%02x, DAT1=%02x\n", inb(SMBHSTCNT),
@@ -100,12 +100,12 @@ static int sch_transaction(void)
100 outb(inb(SMBHSTCNT) | 0x10, SMBHSTCNT); 100 outb(inb(SMBHSTCNT) | 0x10, SMBHSTCNT);
101 101
102 do { 102 do {
103 msleep(1); 103 usleep_range(100, 200);
104 temp = inb(SMBHSTSTS) & 0x0f; 104 temp = inb(SMBHSTSTS) & 0x0f;
105 } while ((temp & 0x08) && (timeout++ < MAX_TIMEOUT)); 105 } while ((temp & 0x08) && (retries++ < MAX_RETRIES));
106 106
107 /* If the SMBus is still busy, we give up */ 107 /* If the SMBus is still busy, we give up */
108 if (timeout > MAX_TIMEOUT) { 108 if (retries > MAX_RETRIES) {
109 dev_err(&sch_adapter.dev, "SMBus Timeout!\n"); 109 dev_err(&sch_adapter.dev, "SMBus Timeout!\n");
110 result = -ETIMEDOUT; 110 result = -ETIMEDOUT;
111 } 111 }
diff --git a/drivers/i2c/i2c-boardinfo.c b/drivers/i2c/i2c-boardinfo.c
index 10274ffb66d7..f24cc64e2e8c 100644
--- a/drivers/i2c/i2c-boardinfo.c
+++ b/drivers/i2c/i2c-boardinfo.c
@@ -13,7 +13,8 @@
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software 15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 * MA 02110-1301 USA.
17 */ 18 */
18 19
19#include <linux/kernel.h> 20#include <linux/kernel.h>
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index e9c18939eda7..feb7dc359186 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -14,7 +14,8 @@
14 14
15 You should have received a copy of the GNU General Public License 15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
18 MA 02110-1301 USA. */
18/* ------------------------------------------------------------------------- */ 19/* ------------------------------------------------------------------------- */
19 20
20/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi>. 21/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi>.
diff --git a/drivers/i2c/i2c-core.h b/drivers/i2c/i2c-core.h
index 9f9c57ff6708..18a8fd21d2c2 100644
--- a/drivers/i2c/i2c-core.h
+++ b/drivers/i2c/i2c-core.h
@@ -13,7 +13,8 @@
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software 15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17 * MA 02110-1301 USA.
17 */ 18 */
18 19
19#include <linux/rwsem.h> 20#include <linux/rwsem.h>
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c
index 10e7f1e76586..45048323b75e 100644
--- a/drivers/i2c/i2c-dev.c
+++ b/drivers/i2c/i2c-dev.c
@@ -17,7 +17,8 @@
17 17
18 You should have received a copy of the GNU General Public License 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 19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21 MA 02110-1301 USA.
21*/ 22*/
22 23
23/* Note that this is a complete rewrite of Simon Vogl's i2c-dev module. 24/* Note that this is a complete rewrite of Simon Vogl's i2c-dev module.
diff --git a/drivers/i2c/i2c-smbus.c b/drivers/i2c/i2c-smbus.c
index f61ccc1e5ea3..9836d08f7a77 100644
--- a/drivers/i2c/i2c-smbus.c
+++ b/drivers/i2c/i2c-smbus.c
@@ -16,7 +16,8 @@
16 * 16 *
17 * You should have received a copy of the GNU General Public License 17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software 18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20 * MA 02110-1301 USA.
20 */ 21 */
21 22
22#include <linux/kernel.h> 23#include <linux/kernel.h>
diff --git a/drivers/i2c/muxes/pca9541.c b/drivers/i2c/muxes/pca9541.c
index ed699c5aa79d..e0df9b6c66b3 100644
--- a/drivers/i2c/muxes/pca9541.c
+++ b/drivers/i2c/muxes/pca9541.c
@@ -393,18 +393,7 @@ static struct i2c_driver pca9541_driver = {
393 .id_table = pca9541_id, 393 .id_table = pca9541_id,
394}; 394};
395 395
396static int __init pca9541_init(void) 396module_i2c_driver(pca9541_driver);
397{
398 return i2c_add_driver(&pca9541_driver);
399}
400
401static void __exit pca9541_exit(void)
402{
403 i2c_del_driver(&pca9541_driver);
404}
405
406module_init(pca9541_init);
407module_exit(pca9541_exit);
408 397
409MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>"); 398MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>");
410MODULE_DESCRIPTION("PCA9541 I2C master selector driver"); 399MODULE_DESCRIPTION("PCA9541 I2C master selector driver");
diff --git a/drivers/i2c/muxes/pca954x.c b/drivers/i2c/muxes/pca954x.c
index 6f8953664636..0e37ef27aa12 100644
--- a/drivers/i2c/muxes/pca954x.c
+++ b/drivers/i2c/muxes/pca954x.c
@@ -284,18 +284,7 @@ static struct i2c_driver pca954x_driver = {
284 .id_table = pca954x_id, 284 .id_table = pca954x_id,
285}; 285};
286 286
287static int __init pca954x_init(void) 287module_i2c_driver(pca954x_driver);
288{
289 return i2c_add_driver(&pca954x_driver);
290}
291
292static void __exit pca954x_exit(void)
293{
294 i2c_del_driver(&pca954x_driver);
295}
296
297module_init(pca954x_init);
298module_exit(pca954x_exit);
299 288
300MODULE_AUTHOR("Rodolfo Giometti <giometti@linux.it>"); 289MODULE_AUTHOR("Rodolfo Giometti <giometti@linux.it>");
301MODULE_DESCRIPTION("PCA954x I2C mux/switch driver"); 290MODULE_DESCRIPTION("PCA954x I2C mux/switch driver");
diff --git a/include/linux/i2c-algo-bit.h b/include/linux/i2c-algo-bit.h
index 584ffa0f3282..63904ba6887e 100644
--- a/include/linux/i2c-algo-bit.h
+++ b/include/linux/i2c-algo-bit.h
@@ -15,7 +15,8 @@
15 15
16 You should have received a copy of the GNU General Public License 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 17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 MA 02110-1301 USA. */
19/* ------------------------------------------------------------------------- */ 20/* ------------------------------------------------------------------------- */
20 21
21/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even 22/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even
diff --git a/include/linux/i2c-algo-pcf.h b/include/linux/i2c-algo-pcf.h
index 0f91a957a690..538e8f41a319 100644
--- a/include/linux/i2c-algo-pcf.h
+++ b/include/linux/i2c-algo-pcf.h
@@ -16,7 +16,8 @@
16 16
17 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software 18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20 MA 02110-1301 USA. */
20/* ------------------------------------------------------------------------- */ 21/* ------------------------------------------------------------------------- */
21 22
22/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even 23/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even
diff --git a/include/linux/i2c-dev.h b/include/linux/i2c-dev.h
index fd53bfd26470..8a7406b2114d 100644
--- a/include/linux/i2c-dev.h
+++ b/include/linux/i2c-dev.h
@@ -16,7 +16,8 @@
16 16
17 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software 18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
20 MA 02110-1301 USA.
20*/ 21*/
21 22
22#ifndef _LINUX_I2C_DEV_H 23#ifndef _LINUX_I2C_DEV_H
diff --git a/include/linux/i2c-mux.h b/include/linux/i2c-mux.h
index 34536effd652..747f0cde4164 100644
--- a/include/linux/i2c-mux.h
+++ b/include/linux/i2c-mux.h
@@ -18,7 +18,8 @@
18 * 18 *
19 * You should have received a copy of the GNU General Public License 19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software 20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22 * MA 02110-1301 USA.
22 */ 23 */
23 24
24#ifndef _LINUX_I2C_MUX_H 25#ifndef _LINUX_I2C_MUX_H
diff --git a/include/linux/i2c-smbus.h b/include/linux/i2c-smbus.h
index 63f57a8c8b31..017fb40f702a 100644
--- a/include/linux/i2c-smbus.h
+++ b/include/linux/i2c-smbus.h
@@ -15,7 +15,8 @@
15 * 15 *
16 * You should have received a copy of the GNU General Public License 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 17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301 USA.
19 */ 20 */
20 21
21#ifndef _LINUX_I2C_SMBUS_H 22#ifndef _LINUX_I2C_SMBUS_H
diff --git a/include/linux/i2c.h b/include/linux/i2c.h
index 8e25a9167f13..195d8b3d9cfb 100644
--- a/include/linux/i2c.h
+++ b/include/linux/i2c.h
@@ -17,7 +17,8 @@
17 17
18 You should have received a copy of the GNU General Public License 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 19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21 MA 02110-1301 USA. */
21/* ------------------------------------------------------------------------- */ 22/* ------------------------------------------------------------------------- */
22 23
23/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and 24/* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and