diff options
Diffstat (limited to 'drivers/i2c')
57 files changed, 301 insertions, 234 deletions
diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c index 65ef9664d5da..899bede81b31 100644 --- a/drivers/i2c/algos/i2c-algo-bit.c +++ b/drivers/i2c/algos/i2c-algo-bit.c | |||
@@ -12,11 +12,6 @@ | |||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. | 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., 51 Franklin Street, Fifth Floor, Boston, | ||
19 | MA 02110-1301 USA. | ||
20 | * ------------------------------------------------------------------------- */ | 15 | * ------------------------------------------------------------------------- */ |
21 | 16 | ||
22 | /* With some changes from Frodo Looijaard <frodol@dds.nl>, Kyösti Mälkki | 17 | /* With some changes from Frodo Looijaard <frodol@dds.nl>, Kyösti Mälkki |
diff --git a/drivers/i2c/algos/i2c-algo-pca.c b/drivers/i2c/algos/i2c-algo-pca.c index 8b10f88b13d9..580dbf05c148 100644 --- a/drivers/i2c/algos/i2c-algo-pca.c +++ b/drivers/i2c/algos/i2c-algo-pca.c | |||
@@ -12,11 +12,6 @@ | |||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 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., 51 Franklin Street, Fifth Floor, Boston, | ||
19 | * MA 02110-1301 USA. | ||
20 | */ | 15 | */ |
21 | 16 | ||
22 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/algos/i2c-algo-pcf.c b/drivers/i2c/algos/i2c-algo-pcf.c index 34370090b753..270d84bfc2c6 100644 --- a/drivers/i2c/algos/i2c-algo-pcf.c +++ b/drivers/i2c/algos/i2c-algo-pcf.c | |||
@@ -14,11 +14,6 @@ | |||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
16 | * | 16 | * |
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 | ||
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
20 | * MA 02110-1301 USA. | ||
21 | * | ||
22 | * With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and | 17 | * With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and |
23 | * Frodo Looijaard <frodol@dds.nl>, and also from Martin Bailey | 18 | * Frodo Looijaard <frodol@dds.nl>, and also from Martin Bailey |
24 | * <mbailey@littlefeet-inc.com> | 19 | * <mbailey@littlefeet-inc.com> |
diff --git a/drivers/i2c/algos/i2c-algo-pcf.h b/drivers/i2c/algos/i2c-algo-pcf.h index 1ec703ee788d..262ee801975b 100644 --- a/drivers/i2c/algos/i2c-algo-pcf.h +++ b/drivers/i2c/algos/i2c-algo-pcf.h | |||
@@ -12,12 +12,7 @@ | |||
12 | This program is distributed in the hope that it will be useful, | 12 | This program is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. */ |
16 | |||
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 | ||
19 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
20 | MA 02110-1301 USA. */ | ||
21 | /* -------------------------------------------------------------------- */ | 16 | /* -------------------------------------------------------------------- */ |
22 | 17 | ||
23 | /* With some changes from Frodo Looijaard <frodol@dds.nl> */ | 18 | /* With some changes from Frodo Looijaard <frodol@dds.nl> */ |
diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig index 917c3585f45b..b4d135cc2f39 100644 --- a/drivers/i2c/busses/Kconfig +++ b/drivers/i2c/busses/Kconfig | |||
@@ -881,6 +881,16 @@ config I2C_DIOLAN_U2C | |||
881 | This driver can also be built as a module. If so, the module | 881 | This driver can also be built as a module. If so, the module |
882 | will be called i2c-diolan-u2c. | 882 | will be called i2c-diolan-u2c. |
883 | 883 | ||
884 | config I2C_DLN2 | ||
885 | tristate "Diolan DLN-2 USB I2C adapter" | ||
886 | depends on MFD_DLN2 | ||
887 | help | ||
888 | If you say yes to this option, support will be included for Diolan | ||
889 | DLN2, a USB to I2C interface. | ||
890 | |||
891 | This driver can also be built as a module. If so, the module | ||
892 | will be called i2c-dln2. | ||
893 | |||
884 | config I2C_PARPORT | 894 | config I2C_PARPORT |
885 | tristate "Parallel port adapter" | 895 | tristate "Parallel port adapter" |
886 | depends on PARPORT | 896 | depends on PARPORT |
diff --git a/drivers/i2c/busses/Makefile b/drivers/i2c/busses/Makefile index 78d56c54ba2b..cdac7f15eab5 100644 --- a/drivers/i2c/busses/Makefile +++ b/drivers/i2c/busses/Makefile | |||
@@ -87,6 +87,7 @@ obj-$(CONFIG_I2C_RCAR) += i2c-rcar.o | |||
87 | 87 | ||
88 | # External I2C/SMBus adapter drivers | 88 | # External I2C/SMBus adapter drivers |
89 | obj-$(CONFIG_I2C_DIOLAN_U2C) += i2c-diolan-u2c.o | 89 | obj-$(CONFIG_I2C_DIOLAN_U2C) += i2c-diolan-u2c.o |
90 | obj-$(CONFIG_I2C_DLN2) += i2c-dln2.o | ||
90 | obj-$(CONFIG_I2C_PARPORT) += i2c-parport.o | 91 | obj-$(CONFIG_I2C_PARPORT) += i2c-parport.o |
91 | obj-$(CONFIG_I2C_PARPORT_LIGHT) += i2c-parport-light.o | 92 | obj-$(CONFIG_I2C_PARPORT_LIGHT) += i2c-parport-light.o |
92 | obj-$(CONFIG_I2C_ROBOTFUZZ_OSIF) += i2c-robotfuzz-osif.o | 93 | obj-$(CONFIG_I2C_ROBOTFUZZ_OSIF) += i2c-robotfuzz-osif.o |
diff --git a/drivers/i2c/busses/i2c-ali1535.c b/drivers/i2c/busses/i2c-ali1535.c index 451e305f7971..4f2d78868281 100644 --- a/drivers/i2c/busses/i2c-ali1535.c +++ b/drivers/i2c/busses/i2c-ali1535.c | |||
@@ -14,10 +14,6 @@ | |||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU General Public License for more details. | 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 | */ | 17 | */ |
22 | 18 | ||
23 | /* | 19 | /* |
diff --git a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c index 2fa21ce9682b..45c5c4883022 100644 --- a/drivers/i2c/busses/i2c-ali15x3.c +++ b/drivers/i2c/busses/i2c-ali15x3.c | |||
@@ -12,10 +12,6 @@ | |||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. | 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 | */ | 15 | */ |
20 | 16 | ||
21 | /* | 17 | /* |
diff --git a/drivers/i2c/busses/i2c-amd756-s4882.c b/drivers/i2c/busses/i2c-amd756-s4882.c index 41fc6837fb8b..65e324054970 100644 --- a/drivers/i2c/busses/i2c-amd756-s4882.c +++ b/drivers/i2c/busses/i2c-amd756-s4882.c | |||
@@ -12,10 +12,6 @@ | |||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 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 | */ | 15 | */ |
20 | 16 | ||
21 | /* | 17 | /* |
diff --git a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c index a16f72891358..6c7113d990f8 100644 --- a/drivers/i2c/busses/i2c-amd756.c +++ b/drivers/i2c/busses/i2c-amd756.c | |||
@@ -15,10 +15,6 @@ | |||
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | GNU General Public License for more details. | 17 | GNU General Public License for more details. |
18 | |||
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 | ||
21 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
22 | */ | 18 | */ |
23 | 19 | ||
24 | /* | 20 | /* |
diff --git a/drivers/i2c/busses/i2c-at91.c b/drivers/i2c/busses/i2c-at91.c index 917d54588d95..e05a672db3e5 100644 --- a/drivers/i2c/busses/i2c-at91.c +++ b/drivers/i2c/busses/i2c-at91.c | |||
@@ -434,7 +434,7 @@ static int at91_do_twi_transfer(struct at91_twi_dev *dev) | |||
434 | } | 434 | } |
435 | } | 435 | } |
436 | 436 | ||
437 | ret = wait_for_completion_io_timeout(&dev->cmd_complete, | 437 | ret = wait_for_completion_timeout(&dev->cmd_complete, |
438 | dev->adapter.timeout); | 438 | dev->adapter.timeout); |
439 | if (ret == 0) { | 439 | if (ret == 0) { |
440 | dev_err(dev->dev, "controller timed out\n"); | 440 | dev_err(dev->dev, "controller timed out\n"); |
diff --git a/drivers/i2c/busses/i2c-au1550.c b/drivers/i2c/busses/i2c-au1550.c index 8762458ca7da..6f8c0756e350 100644 --- a/drivers/i2c/busses/i2c-au1550.c +++ b/drivers/i2c/busses/i2c-au1550.c | |||
@@ -21,10 +21,6 @@ | |||
21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
23 | * GNU General Public License for more details. | 23 | * GNU General Public License for more details. |
24 | * | ||
25 | * You should have received a copy of the GNU General Public License | ||
26 | * along with this program; if not, write to the Free Software | ||
27 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
28 | */ | 24 | */ |
29 | 25 | ||
30 | #include <linux/delay.h> | 26 | #include <linux/delay.h> |
diff --git a/drivers/i2c/busses/i2c-cadence.c b/drivers/i2c/busses/i2c-cadence.c index 63f3f03ecc9b..c604f4c3ac0d 100644 --- a/drivers/i2c/busses/i2c-cadence.c +++ b/drivers/i2c/busses/i2c-cadence.c | |||
@@ -111,6 +111,8 @@ | |||
111 | #define CDNS_I2C_DIVA_MAX 4 | 111 | #define CDNS_I2C_DIVA_MAX 4 |
112 | #define CDNS_I2C_DIVB_MAX 64 | 112 | #define CDNS_I2C_DIVB_MAX 64 |
113 | 113 | ||
114 | #define CDNS_I2C_TIMEOUT_MAX 0xFF | ||
115 | |||
114 | #define cdns_i2c_readreg(offset) readl_relaxed(id->membase + offset) | 116 | #define cdns_i2c_readreg(offset) readl_relaxed(id->membase + offset) |
115 | #define cdns_i2c_writereg(val, offset) writel_relaxed(val, id->membase + offset) | 117 | #define cdns_i2c_writereg(val, offset) writel_relaxed(val, id->membase + offset) |
116 | 118 | ||
@@ -852,6 +854,15 @@ static int cdns_i2c_probe(struct platform_device *pdev) | |||
852 | goto err_clk_dis; | 854 | goto err_clk_dis; |
853 | } | 855 | } |
854 | 856 | ||
857 | /* | ||
858 | * Cadence I2C controller has a bug wherein it generates | ||
859 | * invalid read transaction after HW timeout in master receiver mode. | ||
860 | * HW timeout is not used by this driver and the interrupt is disabled. | ||
861 | * But the feature itself cannot be disabled. Hence maximum value | ||
862 | * is written to this register to reduce the chances of error. | ||
863 | */ | ||
864 | cdns_i2c_writereg(CDNS_I2C_TIMEOUT_MAX, CDNS_I2C_TIME_OUT_OFFSET); | ||
865 | |||
855 | dev_info(&pdev->dev, "%u kHz mmio %08lx irq %d\n", | 866 | dev_info(&pdev->dev, "%u kHz mmio %08lx irq %d\n", |
856 | id->i2c_clk / 1000, (unsigned long)r_mem->start, id->irq); | 867 | id->i2c_clk / 1000, (unsigned long)r_mem->start, id->irq); |
857 | 868 | ||
diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c index f3b89a4698b6..5bdbc71698d0 100644 --- a/drivers/i2c/busses/i2c-cpm.c +++ b/drivers/i2c/busses/i2c-cpm.c | |||
@@ -23,10 +23,6 @@ | |||
23 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 23 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
24 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 24 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
25 | * GNU General Public License for more details. | 25 | * GNU General Public License for more details. |
26 | * | ||
27 | * You should have received a copy of the GNU General Public License | ||
28 | * along with this program; if not, write to the Free Software | ||
29 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
30 | */ | 26 | */ |
31 | 27 | ||
32 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index 4d9614719128..01f0cd87a4a5 100644 --- a/drivers/i2c/busses/i2c-davinci.c +++ b/drivers/i2c/busses/i2c-davinci.c | |||
@@ -17,10 +17,6 @@ | |||
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
19 | * GNU General Public License for more details. | 19 | * GNU General Public License for more details. |
20 | * | ||
21 | * You should have received a copy of the GNU General Public License | ||
22 | * along with this program; if not, write to the Free Software | ||
23 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
24 | * ---------------------------------------------------------------------------- | 20 | * ---------------------------------------------------------------------------- |
25 | * | 21 | * |
26 | */ | 22 | */ |
@@ -411,11 +407,9 @@ i2c_davinci_xfer_msg(struct i2c_adapter *adap, struct i2c_msg *msg, int stop) | |||
411 | if (dev->cmd_err & DAVINCI_I2C_STR_NACK) { | 407 | if (dev->cmd_err & DAVINCI_I2C_STR_NACK) { |
412 | if (msg->flags & I2C_M_IGNORE_NAK) | 408 | if (msg->flags & I2C_M_IGNORE_NAK) |
413 | return msg->len; | 409 | return msg->len; |
414 | if (stop) { | 410 | w = davinci_i2c_read_reg(dev, DAVINCI_I2C_MDR_REG); |
415 | w = davinci_i2c_read_reg(dev, DAVINCI_I2C_MDR_REG); | 411 | w |= DAVINCI_I2C_MDR_STP; |
416 | w |= DAVINCI_I2C_MDR_STP; | 412 | davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, w); |
417 | davinci_i2c_write_reg(dev, DAVINCI_I2C_MDR_REG, w); | ||
418 | } | ||
419 | return -EREMOTEIO; | 413 | return -EREMOTEIO; |
420 | } | 414 | } |
421 | return -EIO; | 415 | return -EIO; |
diff --git a/drivers/i2c/busses/i2c-designware-core.c b/drivers/i2c/busses/i2c-designware-core.c index 3c20e4bd6dd1..23628b7bfb8d 100644 --- a/drivers/i2c/busses/i2c-designware-core.c +++ b/drivers/i2c/busses/i2c-designware-core.c | |||
@@ -18,10 +18,6 @@ | |||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 | * GNU General Public License for more details. | 20 | * GNU General Public License for more details. |
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
25 | * ---------------------------------------------------------------------------- | 21 | * ---------------------------------------------------------------------------- |
26 | * | 22 | * |
27 | */ | 23 | */ |
@@ -363,7 +359,7 @@ int i2c_dw_init(struct dw_i2c_dev *dev) | |||
363 | } | 359 | } |
364 | 360 | ||
365 | /* Configure Tx/Rx FIFO threshold levels */ | 361 | /* Configure Tx/Rx FIFO threshold levels */ |
366 | dw_writel(dev, dev->tx_fifo_depth - 1, DW_IC_TX_TL); | 362 | dw_writel(dev, dev->tx_fifo_depth / 2, DW_IC_TX_TL); |
367 | dw_writel(dev, 0, DW_IC_RX_TL); | 363 | dw_writel(dev, 0, DW_IC_RX_TL); |
368 | 364 | ||
369 | /* configure the i2c master */ | 365 | /* configure the i2c master */ |
diff --git a/drivers/i2c/busses/i2c-designware-core.h b/drivers/i2c/busses/i2c-designware-core.h index d66b6cbc9edc..5a410ef17abd 100644 --- a/drivers/i2c/busses/i2c-designware-core.h +++ b/drivers/i2c/busses/i2c-designware-core.h | |||
@@ -18,10 +18,6 @@ | |||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 | * GNU General Public License for more details. | 20 | * GNU General Public License for more details. |
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
25 | * ---------------------------------------------------------------------------- | 21 | * ---------------------------------------------------------------------------- |
26 | * | 22 | * |
27 | */ | 23 | */ |
diff --git a/drivers/i2c/busses/i2c-designware-pcidrv.c b/drivers/i2c/busses/i2c-designware-pcidrv.c index d31d313ab4f7..acb40f95db78 100644 --- a/drivers/i2c/busses/i2c-designware-pcidrv.c +++ b/drivers/i2c/busses/i2c-designware-pcidrv.c | |||
@@ -19,10 +19,6 @@ | |||
19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
21 | * GNU General Public License for more details. | 21 | * GNU General Public License for more details. |
22 | * | ||
23 | * You should have received a copy of the GNU General Public License | ||
24 | * along with this program; if not, write to the Free Software | ||
25 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
26 | * ---------------------------------------------------------------------------- | 22 | * ---------------------------------------------------------------------------- |
27 | * | 23 | * |
28 | */ | 24 | */ |
diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c index a7431150acf7..373dd4d47765 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c | |||
@@ -18,10 +18,6 @@ | |||
18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 | * GNU General Public License for more details. | 20 | * GNU General Public License for more details. |
21 | * | ||
22 | * You should have received a copy of the GNU General Public License | ||
23 | * along with this program; if not, write to the Free Software | ||
24 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
25 | * ---------------------------------------------------------------------------- | 21 | * ---------------------------------------------------------------------------- |
26 | * | 22 | * |
27 | */ | 23 | */ |
diff --git a/drivers/i2c/busses/i2c-dln2.c b/drivers/i2c/busses/i2c-dln2.c new file mode 100644 index 000000000000..b3fb86af4cbb --- /dev/null +++ b/drivers/i2c/busses/i2c-dln2.c | |||
@@ -0,0 +1,262 @@ | |||
1 | /* | ||
2 | * Driver for the Diolan DLN-2 USB-I2C adapter | ||
3 | * | ||
4 | * Copyright (c) 2014 Intel Corporation | ||
5 | * | ||
6 | * Derived from: | ||
7 | * i2c-diolan-u2c.c | ||
8 | * Copyright (c) 2010-2011 Ericsson AB | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or | ||
11 | * modify it under the terms of the GNU General Public License as | ||
12 | * published by the Free Software Foundation, version 2. | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/module.h> | ||
17 | #include <linux/types.h> | ||
18 | #include <linux/slab.h> | ||
19 | #include <linux/i2c.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/mfd/dln2.h> | ||
22 | |||
23 | #define DLN2_I2C_MODULE_ID 0x03 | ||
24 | #define DLN2_I2C_CMD(cmd) DLN2_CMD(cmd, DLN2_I2C_MODULE_ID) | ||
25 | |||
26 | /* I2C commands */ | ||
27 | #define DLN2_I2C_GET_PORT_COUNT DLN2_I2C_CMD(0x00) | ||
28 | #define DLN2_I2C_ENABLE DLN2_I2C_CMD(0x01) | ||
29 | #define DLN2_I2C_DISABLE DLN2_I2C_CMD(0x02) | ||
30 | #define DLN2_I2C_IS_ENABLED DLN2_I2C_CMD(0x03) | ||
31 | #define DLN2_I2C_WRITE DLN2_I2C_CMD(0x06) | ||
32 | #define DLN2_I2C_READ DLN2_I2C_CMD(0x07) | ||
33 | #define DLN2_I2C_SCAN_DEVICES DLN2_I2C_CMD(0x08) | ||
34 | #define DLN2_I2C_PULLUP_ENABLE DLN2_I2C_CMD(0x09) | ||
35 | #define DLN2_I2C_PULLUP_DISABLE DLN2_I2C_CMD(0x0A) | ||
36 | #define DLN2_I2C_PULLUP_IS_ENABLED DLN2_I2C_CMD(0x0B) | ||
37 | #define DLN2_I2C_TRANSFER DLN2_I2C_CMD(0x0C) | ||
38 | #define DLN2_I2C_SET_MAX_REPLY_COUNT DLN2_I2C_CMD(0x0D) | ||
39 | #define DLN2_I2C_GET_MAX_REPLY_COUNT DLN2_I2C_CMD(0x0E) | ||
40 | |||
41 | #define DLN2_I2C_MAX_XFER_SIZE 256 | ||
42 | #define DLN2_I2C_BUF_SIZE (DLN2_I2C_MAX_XFER_SIZE + 16) | ||
43 | |||
44 | struct dln2_i2c { | ||
45 | struct platform_device *pdev; | ||
46 | struct i2c_adapter adapter; | ||
47 | u8 port; | ||
48 | /* | ||
49 | * Buffer to hold the packet for read or write transfers. One is enough | ||
50 | * since we can't have multiple transfers in parallel on the i2c bus. | ||
51 | */ | ||
52 | void *buf; | ||
53 | }; | ||
54 | |||
55 | static int dln2_i2c_enable(struct dln2_i2c *dln2, bool enable) | ||
56 | { | ||
57 | u16 cmd; | ||
58 | struct { | ||
59 | u8 port; | ||
60 | } tx; | ||
61 | |||
62 | tx.port = dln2->port; | ||
63 | |||
64 | if (enable) | ||
65 | cmd = DLN2_I2C_ENABLE; | ||
66 | else | ||
67 | cmd = DLN2_I2C_DISABLE; | ||
68 | |||
69 | return dln2_transfer_tx(dln2->pdev, cmd, &tx, sizeof(tx)); | ||
70 | } | ||
71 | |||
72 | static int dln2_i2c_write(struct dln2_i2c *dln2, u8 addr, | ||
73 | u8 *data, u16 data_len) | ||
74 | { | ||
75 | int ret; | ||
76 | struct { | ||
77 | u8 port; | ||
78 | u8 addr; | ||
79 | u8 mem_addr_len; | ||
80 | __le32 mem_addr; | ||
81 | __le16 buf_len; | ||
82 | u8 buf[DLN2_I2C_MAX_XFER_SIZE]; | ||
83 | } __packed *tx = dln2->buf; | ||
84 | unsigned len; | ||
85 | |||
86 | BUILD_BUG_ON(sizeof(*tx) > DLN2_I2C_BUF_SIZE); | ||
87 | |||
88 | tx->port = dln2->port; | ||
89 | tx->addr = addr; | ||
90 | tx->mem_addr_len = 0; | ||
91 | tx->mem_addr = 0; | ||
92 | tx->buf_len = cpu_to_le16(data_len); | ||
93 | memcpy(tx->buf, data, data_len); | ||
94 | |||
95 | len = sizeof(*tx) + data_len - DLN2_I2C_MAX_XFER_SIZE; | ||
96 | ret = dln2_transfer_tx(dln2->pdev, DLN2_I2C_WRITE, tx, len); | ||
97 | if (ret < 0) | ||
98 | return ret; | ||
99 | |||
100 | return data_len; | ||
101 | } | ||
102 | |||
103 | static int dln2_i2c_read(struct dln2_i2c *dln2, u16 addr, u8 *data, | ||
104 | u16 data_len) | ||
105 | { | ||
106 | int ret; | ||
107 | struct { | ||
108 | u8 port; | ||
109 | u8 addr; | ||
110 | u8 mem_addr_len; | ||
111 | __le32 mem_addr; | ||
112 | __le16 buf_len; | ||
113 | } __packed tx; | ||
114 | struct { | ||
115 | __le16 buf_len; | ||
116 | u8 buf[DLN2_I2C_MAX_XFER_SIZE]; | ||
117 | } __packed *rx = dln2->buf; | ||
118 | unsigned rx_len = sizeof(*rx); | ||
119 | |||
120 | BUILD_BUG_ON(sizeof(*rx) > DLN2_I2C_BUF_SIZE); | ||
121 | |||
122 | tx.port = dln2->port; | ||
123 | tx.addr = addr; | ||
124 | tx.mem_addr_len = 0; | ||
125 | tx.mem_addr = 0; | ||
126 | tx.buf_len = cpu_to_le16(data_len); | ||
127 | |||
128 | ret = dln2_transfer(dln2->pdev, DLN2_I2C_READ, &tx, sizeof(tx), | ||
129 | rx, &rx_len); | ||
130 | if (ret < 0) | ||
131 | return ret; | ||
132 | if (rx_len < sizeof(rx->buf_len) + data_len) | ||
133 | return -EPROTO; | ||
134 | if (le16_to_cpu(rx->buf_len) != data_len) | ||
135 | return -EPROTO; | ||
136 | |||
137 | memcpy(data, rx->buf, data_len); | ||
138 | |||
139 | return data_len; | ||
140 | } | ||
141 | |||
142 | static int dln2_i2c_xfer(struct i2c_adapter *adapter, | ||
143 | struct i2c_msg *msgs, int num) | ||
144 | { | ||
145 | struct dln2_i2c *dln2 = i2c_get_adapdata(adapter); | ||
146 | struct i2c_msg *pmsg; | ||
147 | struct device *dev = &dln2->adapter.dev; | ||
148 | int i; | ||
149 | |||
150 | for (i = 0; i < num; i++) { | ||
151 | int ret; | ||
152 | |||
153 | pmsg = &msgs[i]; | ||
154 | |||
155 | if (pmsg->len > DLN2_I2C_MAX_XFER_SIZE) { | ||
156 | dev_warn(dev, "maximum transfer size exceeded\n"); | ||
157 | return -EOPNOTSUPP; | ||
158 | } | ||
159 | |||
160 | if (pmsg->flags & I2C_M_RD) { | ||
161 | ret = dln2_i2c_read(dln2, pmsg->addr, pmsg->buf, | ||
162 | pmsg->len); | ||
163 | if (ret < 0) | ||
164 | return ret; | ||
165 | |||
166 | pmsg->len = ret; | ||
167 | } else { | ||
168 | ret = dln2_i2c_write(dln2, pmsg->addr, pmsg->buf, | ||
169 | pmsg->len); | ||
170 | if (ret != pmsg->len) | ||
171 | return -EPROTO; | ||
172 | } | ||
173 | } | ||
174 | |||
175 | return num; | ||
176 | } | ||
177 | |||
178 | static u32 dln2_i2c_func(struct i2c_adapter *a) | ||
179 | { | ||
180 | return I2C_FUNC_I2C | I2C_FUNC_SMBUS_BYTE | I2C_FUNC_SMBUS_BYTE_DATA | | ||
181 | I2C_FUNC_SMBUS_WORD_DATA | I2C_FUNC_SMBUS_BLOCK_PROC_CALL | | ||
182 | I2C_FUNC_SMBUS_I2C_BLOCK; | ||
183 | } | ||
184 | |||
185 | static const struct i2c_algorithm dln2_i2c_usb_algorithm = { | ||
186 | .master_xfer = dln2_i2c_xfer, | ||
187 | .functionality = dln2_i2c_func, | ||
188 | }; | ||
189 | |||
190 | static int dln2_i2c_probe(struct platform_device *pdev) | ||
191 | { | ||
192 | int ret; | ||
193 | struct dln2_i2c *dln2; | ||
194 | struct device *dev = &pdev->dev; | ||
195 | struct dln2_platform_data *pdata = dev_get_platdata(&pdev->dev); | ||
196 | |||
197 | dln2 = devm_kzalloc(dev, sizeof(*dln2), GFP_KERNEL); | ||
198 | if (!dln2) | ||
199 | return -ENOMEM; | ||
200 | |||
201 | dln2->buf = devm_kmalloc(dev, DLN2_I2C_BUF_SIZE, GFP_KERNEL); | ||
202 | if (!dln2->buf) | ||
203 | return -ENOMEM; | ||
204 | |||
205 | dln2->pdev = pdev; | ||
206 | dln2->port = pdata->port; | ||
207 | |||
208 | /* setup i2c adapter description */ | ||
209 | dln2->adapter.owner = THIS_MODULE; | ||
210 | dln2->adapter.class = I2C_CLASS_HWMON; | ||
211 | dln2->adapter.algo = &dln2_i2c_usb_algorithm; | ||
212 | dln2->adapter.dev.parent = dev; | ||
213 | i2c_set_adapdata(&dln2->adapter, dln2); | ||
214 | snprintf(dln2->adapter.name, sizeof(dln2->adapter.name), "%s-%s-%d", | ||
215 | "dln2-i2c", dev_name(pdev->dev.parent), dln2->port); | ||
216 | |||
217 | platform_set_drvdata(pdev, dln2); | ||
218 | |||
219 | /* initialize the i2c interface */ | ||
220 | ret = dln2_i2c_enable(dln2, true); | ||
221 | if (ret < 0) { | ||
222 | dev_err(dev, "failed to initialize adapter: %d\n", ret); | ||
223 | return ret; | ||
224 | } | ||
225 | |||
226 | /* and finally attach to i2c layer */ | ||
227 | ret = i2c_add_adapter(&dln2->adapter); | ||
228 | if (ret < 0) { | ||
229 | dev_err(dev, "failed to add I2C adapter: %d\n", ret); | ||
230 | goto out_disable; | ||
231 | } | ||
232 | |||
233 | return 0; | ||
234 | |||
235 | out_disable: | ||
236 | dln2_i2c_enable(dln2, false); | ||
237 | |||
238 | return ret; | ||
239 | } | ||
240 | |||
241 | static int dln2_i2c_remove(struct platform_device *pdev) | ||
242 | { | ||
243 | struct dln2_i2c *dln2 = platform_get_drvdata(pdev); | ||
244 | |||
245 | i2c_del_adapter(&dln2->adapter); | ||
246 | dln2_i2c_enable(dln2, false); | ||
247 | |||
248 | return 0; | ||
249 | } | ||
250 | |||
251 | static struct platform_driver dln2_i2c_driver = { | ||
252 | .driver.name = "dln2-i2c", | ||
253 | .probe = dln2_i2c_probe, | ||
254 | .remove = dln2_i2c_remove, | ||
255 | }; | ||
256 | |||
257 | module_platform_driver(dln2_i2c_driver); | ||
258 | |||
259 | MODULE_AUTHOR("Laurentiu Palcu <laurentiu.palcu@intel.com>"); | ||
260 | MODULE_DESCRIPTION("Driver for the Diolan DLN2 I2C master interface"); | ||
261 | MODULE_LICENSE("GPL v2"); | ||
262 | MODULE_ALIAS("platform:dln2-i2c"); | ||
diff --git a/drivers/i2c/busses/i2c-eg20t.c b/drivers/i2c/busses/i2c-eg20t.c index a44ea13d1434..76e699f9ed97 100644 --- a/drivers/i2c/busses/i2c-eg20t.c +++ b/drivers/i2c/busses/i2c-eg20t.c | |||
@@ -9,10 +9,6 @@ | |||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 | * GNU General Public License for more details. | 11 | * GNU General Public License for more details. |
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program; if not, write to the Free Software | ||
15 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. | ||
16 | */ | 12 | */ |
17 | 13 | ||
18 | #include <linux/module.h> | 14 | #include <linux/module.h> |
diff --git a/drivers/i2c/busses/i2c-elektor.c b/drivers/i2c/busses/i2c-elektor.c index 485497066ed7..92e8c0ce1625 100644 --- a/drivers/i2c/busses/i2c-elektor.c +++ b/drivers/i2c/busses/i2c-elektor.c | |||
@@ -12,11 +12,7 @@ | |||
12 | This program is distributed in the hope that it will be useful, | 12 | This program is distributed in the hope that it will be useful, |
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. */ |
16 | |||
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 | ||
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ | ||
20 | /* ------------------------------------------------------------------------- */ | 16 | /* ------------------------------------------------------------------------- */ |
21 | 17 | ||
22 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even | 18 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi> and even |
diff --git a/drivers/i2c/busses/i2c-hydra.c b/drivers/i2c/busses/i2c-hydra.c index 14d2b76de25f..b7864cf42a72 100644 --- a/drivers/i2c/busses/i2c-hydra.c +++ b/drivers/i2c/busses/i2c-hydra.c | |||
@@ -15,10 +15,6 @@ | |||
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | GNU General Public License for more details. | 17 | GNU General Public License for more details. |
18 | |||
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 | ||
21 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
22 | */ | 18 | */ |
23 | 19 | ||
24 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c index 7cfc183b3d63..6ab4f1cb21f3 100644 --- a/drivers/i2c/busses/i2c-i801.c +++ b/drivers/i2c/busses/i2c-i801.c | |||
@@ -15,10 +15,6 @@ | |||
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | GNU General Public License for more details. | 17 | GNU General Public License for more details. |
18 | |||
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 | ||
21 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
22 | */ | 18 | */ |
23 | 19 | ||
24 | /* | 20 | /* |
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index c48e46af670a..e9fb7cf78612 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c | |||
@@ -11,11 +11,6 @@ | |||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | 13 | * |
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 | ||
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | ||
17 | * USA. | ||
18 | * | ||
19 | * Author: | 14 | * Author: |
20 | * Darius Augulis, Teltonika Inc. | 15 | * Darius Augulis, Teltonika Inc. |
21 | * | 16 | * |
diff --git a/drivers/i2c/busses/i2c-iop3xx.h b/drivers/i2c/busses/i2c-iop3xx.h index 097e270955d0..2d6929c2bd92 100644 --- a/drivers/i2c/busses/i2c-iop3xx.h +++ b/drivers/i2c/busses/i2c-iop3xx.h | |||
@@ -11,11 +11,7 @@ | |||
11 | This program is distributed in the hope that it will be useful, | 11 | This program is distributed in the hope that it will be useful, |
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. | 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 | /* ------------------------------------------------------------------------- */ | 15 | /* ------------------------------------------------------------------------- */ |
20 | 16 | ||
21 | 17 | ||
diff --git a/drivers/i2c/busses/i2c-isch.c b/drivers/i2c/busses/i2c-isch.c index cf99dbf21fd1..113293d275f6 100644 --- a/drivers/i2c/busses/i2c-isch.c +++ b/drivers/i2c/busses/i2c-isch.c | |||
@@ -14,10 +14,6 @@ | |||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU General Public License for more details. | 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 | */ | 17 | */ |
22 | 18 | ||
23 | /* | 19 | /* |
diff --git a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-ismt.c index 3f6ecbfb9a56..f2b0ff011631 100644 --- a/drivers/i2c/busses/i2c-ismt.c +++ b/drivers/i2c/busses/i2c-ismt.c | |||
@@ -14,10 +14,6 @@ | |||
14 | * WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
16 | * General Public License for more details. | 16 | * 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., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. | ||
21 | * The full GNU General Public License is included in this distribution | 17 | * The full GNU General Public License is included in this distribution |
22 | * in the file called LICENSE.GPL. | 18 | * in the file called LICENSE.GPL. |
23 | * | 19 | * |
diff --git a/drivers/i2c/busses/i2c-nforce2-s4985.c b/drivers/i2c/busses/i2c-nforce2-s4985.c index b170bdffb5de..88eda09e73c0 100644 --- a/drivers/i2c/busses/i2c-nforce2-s4985.c +++ b/drivers/i2c/busses/i2c-nforce2-s4985.c | |||
@@ -12,10 +12,6 @@ | |||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 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 | */ | 15 | */ |
20 | 16 | ||
21 | /* | 17 | /* |
diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c index ee3a76c7ae97..70b3c9158509 100644 --- a/drivers/i2c/busses/i2c-nforce2.c +++ b/drivers/i2c/busses/i2c-nforce2.c | |||
@@ -17,10 +17,6 @@ | |||
17 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 17 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
19 | GNU General Public License for more details. | 19 | GNU General Public License for more details. |
20 | |||
21 | You should have received a copy of the GNU General Public License | ||
22 | along with this program; if not, write to the Free Software | ||
23 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
24 | */ | 20 | */ |
25 | 21 | ||
26 | /* | 22 | /* |
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 0dffb0e62c3b..277a2288d4a8 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c | |||
@@ -22,10 +22,6 @@ | |||
22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
24 | * GNU General Public License for more details. | 24 | * GNU General Public License for more details. |
25 | * | ||
26 | * You should have received a copy of the GNU General Public License | ||
27 | * along with this program; if not, write to the Free Software | ||
28 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
29 | */ | 25 | */ |
30 | 26 | ||
31 | #include <linux/module.h> | 27 | #include <linux/module.h> |
@@ -926,14 +922,12 @@ omap_i2c_isr_thread(int this_irq, void *dev_id) | |||
926 | if (stat & OMAP_I2C_STAT_NACK) { | 922 | if (stat & OMAP_I2C_STAT_NACK) { |
927 | err |= OMAP_I2C_STAT_NACK; | 923 | err |= OMAP_I2C_STAT_NACK; |
928 | omap_i2c_ack_stat(dev, OMAP_I2C_STAT_NACK); | 924 | omap_i2c_ack_stat(dev, OMAP_I2C_STAT_NACK); |
929 | break; | ||
930 | } | 925 | } |
931 | 926 | ||
932 | if (stat & OMAP_I2C_STAT_AL) { | 927 | if (stat & OMAP_I2C_STAT_AL) { |
933 | dev_err(dev->dev, "Arbitration lost\n"); | 928 | dev_err(dev->dev, "Arbitration lost\n"); |
934 | err |= OMAP_I2C_STAT_AL; | 929 | err |= OMAP_I2C_STAT_AL; |
935 | omap_i2c_ack_stat(dev, OMAP_I2C_STAT_AL); | 930 | omap_i2c_ack_stat(dev, OMAP_I2C_STAT_AL); |
936 | break; | ||
937 | } | 931 | } |
938 | 932 | ||
939 | /* | 933 | /* |
@@ -958,11 +952,13 @@ omap_i2c_isr_thread(int this_irq, void *dev_id) | |||
958 | if (dev->fifo_size) | 952 | if (dev->fifo_size) |
959 | num_bytes = dev->buf_len; | 953 | num_bytes = dev->buf_len; |
960 | 954 | ||
961 | omap_i2c_receive_data(dev, num_bytes, true); | 955 | if (dev->errata & I2C_OMAP_ERRATA_I207) { |
962 | |||
963 | if (dev->errata & I2C_OMAP_ERRATA_I207) | ||
964 | i2c_omap_errata_i207(dev, stat); | 956 | i2c_omap_errata_i207(dev, stat); |
957 | num_bytes = (omap_i2c_read_reg(dev, | ||
958 | OMAP_I2C_BUFSTAT_REG) >> 8) & 0x3F; | ||
959 | } | ||
965 | 960 | ||
961 | omap_i2c_receive_data(dev, num_bytes, true); | ||
966 | omap_i2c_ack_stat(dev, OMAP_I2C_STAT_RDR); | 962 | omap_i2c_ack_stat(dev, OMAP_I2C_STAT_RDR); |
967 | continue; | 963 | continue; |
968 | } | 964 | } |
diff --git a/drivers/i2c/busses/i2c-parport-light.c b/drivers/i2c/busses/i2c-parport-light.c index 62f55fe624cb..d1f625f923c7 100644 --- a/drivers/i2c/busses/i2c-parport-light.c +++ b/drivers/i2c/busses/i2c-parport-light.c | |||
@@ -18,10 +18,6 @@ | |||
18 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 | GNU General Public License for more details. | 20 | GNU General Public License for more details. |
21 | |||
22 | You should have received a copy of the GNU General Public License | ||
23 | along with this program; if not, write to the Free Software | ||
24 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
25 | * ------------------------------------------------------------------------ */ | 21 | * ------------------------------------------------------------------------ */ |
26 | 22 | ||
27 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-parport.c b/drivers/i2c/busses/i2c-parport.c index a27aae2d6757..a1fac5aa9bae 100644 --- a/drivers/i2c/busses/i2c-parport.c +++ b/drivers/i2c/busses/i2c-parport.c | |||
@@ -18,10 +18,6 @@ | |||
18 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 18 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
20 | GNU General Public License for more details. | 20 | GNU General Public License for more details. |
21 | |||
22 | You should have received a copy of the GNU General Public License | ||
23 | along with this program; if not, write to the Free Software | ||
24 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
25 | * ------------------------------------------------------------------------ */ | 21 | * ------------------------------------------------------------------------ */ |
26 | 22 | ||
27 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-parport.h b/drivers/i2c/busses/i2c-parport.h index e572f3aac0f7..4e1294536805 100644 --- a/drivers/i2c/busses/i2c-parport.h +++ b/drivers/i2c/busses/i2c-parport.h | |||
@@ -12,10 +12,6 @@ | |||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. | 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 | * ------------------------------------------------------------------------ */ | 15 | * ------------------------------------------------------------------------ */ |
20 | 16 | ||
21 | #define PORT_DATA 0 | 17 | #define PORT_DATA 0 |
diff --git a/drivers/i2c/busses/i2c-pasemi.c b/drivers/i2c/busses/i2c-pasemi.c index 7a9dce43e115..df1dbc92a024 100644 --- a/drivers/i2c/busses/i2c-pasemi.c +++ b/drivers/i2c/busses/i2c-pasemi.c | |||
@@ -11,10 +11,6 @@ | |||
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. |
14 | * | ||
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 | ||
17 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
18 | */ | 14 | */ |
19 | 15 | ||
20 | #include <linux/module.h> | 16 | #include <linux/module.h> |
diff --git a/drivers/i2c/busses/i2c-pca-isa.c b/drivers/i2c/busses/i2c-pca-isa.c index 323f061a3163..e0eb4ca0102e 100644 --- a/drivers/i2c/busses/i2c-pca-isa.c +++ b/drivers/i2c/busses/i2c-pca-isa.c | |||
@@ -12,10 +12,6 @@ | |||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 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 | */ | 15 | */ |
20 | 16 | ||
21 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-piix4.c b/drivers/i2c/busses/i2c-piix4.c index a6f54ba27e2a..67cbec6796a0 100644 --- a/drivers/i2c/busses/i2c-piix4.c +++ b/drivers/i2c/busses/i2c-piix4.c | |||
@@ -11,10 +11,6 @@ | |||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | |||
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 | ||
17 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
18 | */ | 14 | */ |
19 | 15 | ||
20 | /* | 16 | /* |
diff --git a/drivers/i2c/busses/i2c-pmcmsp.c b/drivers/i2c/busses/i2c-pmcmsp.c index 8564768fee32..177834e2d841 100644 --- a/drivers/i2c/busses/i2c-pmcmsp.c +++ b/drivers/i2c/busses/i2c-pmcmsp.c | |||
@@ -18,10 +18,6 @@ | |||
18 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 18 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
19 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 19 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
20 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 20 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
21 | * | ||
22 | * You should have received a copy of the GNU General Public License along | ||
23 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
24 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
25 | */ | 21 | */ |
26 | 22 | ||
27 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c index 01e967763c2a..60a53c169ed2 100644 --- a/drivers/i2c/busses/i2c-powermac.c +++ b/drivers/i2c/busses/i2c-powermac.c | |||
@@ -14,10 +14,6 @@ | |||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. |
16 | 16 | ||
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 | ||
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | |||
21 | */ | 17 | */ |
22 | 18 | ||
23 | #include <linux/module.h> | 19 | #include <linux/module.h> |
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index e3b0337faeb7..65244774bfa3 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c | |||
@@ -14,10 +14,6 @@ | |||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU General Public License for more details. | 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | 17 | */ |
22 | 18 | ||
23 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c index 8b5e79cb4468..4855188747c9 100644 --- a/drivers/i2c/busses/i2c-sh_mobile.c +++ b/drivers/i2c/busses/i2c-sh_mobile.c | |||
@@ -14,10 +14,6 @@ | |||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU General Public License for more details. | 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | */ | 17 | */ |
22 | 18 | ||
23 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-sibyte.c b/drivers/i2c/busses/i2c-sibyte.c index 0fe505d7abe9..2b6219d86b0f 100644 --- a/drivers/i2c/busses/i2c-sibyte.c +++ b/drivers/i2c/busses/i2c-sibyte.c | |||
@@ -12,10 +12,6 @@ | |||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
19 | */ | 15 | */ |
20 | 16 | ||
21 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-simtec.c b/drivers/i2c/busses/i2c-simtec.c index 964e5c6f84ab..15ac8395dcd3 100644 --- a/drivers/i2c/busses/i2c-simtec.c +++ b/drivers/i2c/busses/i2c-simtec.c | |||
@@ -12,10 +12,6 @@ | |||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | * GNU General Public License for more details. | 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | 15 | */ |
20 | 16 | ||
21 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-sis5595.c b/drivers/i2c/busses/i2c-sis5595.c index ac9bc33acef4..7d58a40faf2d 100644 --- a/drivers/i2c/busses/i2c-sis5595.c +++ b/drivers/i2c/busses/i2c-sis5595.c | |||
@@ -11,10 +11,6 @@ | |||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | |||
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 | ||
17 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
18 | */ | 14 | */ |
19 | 15 | ||
20 | /* Note: we assume there can only be one SIS5595 with one SMBus interface */ | 16 | /* Note: we assume there can only be one SIS5595 with one SMBus interface */ |
diff --git a/drivers/i2c/busses/i2c-sis630.c b/drivers/i2c/busses/i2c-sis630.c index c6366733008d..1e6805b5cef2 100644 --- a/drivers/i2c/busses/i2c-sis630.c +++ b/drivers/i2c/busses/i2c-sis630.c | |||
@@ -10,10 +10,6 @@ | |||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | GNU General Public License for more details. | 12 | GNU General Public License for more details. |
13 | |||
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 | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
17 | */ | 13 | */ |
18 | 14 | ||
19 | /* | 15 | /* |
diff --git a/drivers/i2c/busses/i2c-sis96x.c b/drivers/i2c/busses/i2c-sis96x.c index 8dc2fc5f74ff..44b904426073 100644 --- a/drivers/i2c/busses/i2c-sis96x.c +++ b/drivers/i2c/busses/i2c-sis96x.c | |||
@@ -10,10 +10,6 @@ | |||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | GNU General Public License for more details. | 12 | GNU General Public License for more details. |
13 | |||
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 | ||
16 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
17 | */ | 13 | */ |
18 | 14 | ||
19 | /* | 15 | /* |
diff --git a/drivers/i2c/busses/i2c-taos-evm.c b/drivers/i2c/busses/i2c-taos-evm.c index 10855a0b7e7f..4c7fc2d47014 100644 --- a/drivers/i2c/busses/i2c-taos-evm.c +++ b/drivers/i2c/busses/i2c-taos-evm.c | |||
@@ -13,10 +13,6 @@ | |||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
16 | * | ||
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 | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | */ | 16 | */ |
21 | 17 | ||
22 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
diff --git a/drivers/i2c/busses/i2c-via.c b/drivers/i2c/busses/i2c-via.c index f4a1ed757612..59b1d233ca7b 100644 --- a/drivers/i2c/busses/i2c-via.c +++ b/drivers/i2c/busses/i2c-via.c | |||
@@ -12,10 +12,6 @@ | |||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | GNU General Public License for more details. | 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 | */ | 15 | */ |
20 | 16 | ||
21 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/busses/i2c-viapro.c b/drivers/i2c/busses/i2c-viapro.c index 6841200b6e50..0ee2646f3b00 100644 --- a/drivers/i2c/busses/i2c-viapro.c +++ b/drivers/i2c/busses/i2c-viapro.c | |||
@@ -13,10 +13,6 @@ | |||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. |
16 | |||
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 | ||
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | */ | 16 | */ |
21 | 17 | ||
22 | /* | 18 | /* |
diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index ade9223912d3..cc65ea0b818f 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c | |||
@@ -12,10 +12,6 @@ | |||
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | * GNU General Public License for more details. | 13 | * GNU General Public License for more details. |
14 | * | 14 | * |
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 | ||
17 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
18 | * | ||
19 | * | 15 | * |
20 | * This code was implemented by Mocean Laboratories AB when porting linux | 16 | * This code was implemented by Mocean Laboratories AB when porting linux |
21 | * to the automotive development board Russellville. The copyright holder | 17 | * to the automotive development board Russellville. The copyright holder |
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index ff3f5747e43b..5153354b1a6b 100644 --- a/drivers/i2c/busses/scx200_acb.c +++ b/drivers/i2c/busses/scx200_acb.c | |||
@@ -17,10 +17,6 @@ | |||
17 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 17 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 18 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
19 | General Public License for more details. | 19 | General Public License for more details. |
20 | |||
21 | You should have received a copy of the GNU General Public License | ||
22 | along with this program; if not, write to the Free Software | ||
23 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
24 | */ | 20 | */ |
25 | 21 | ||
26 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt | 22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
diff --git a/drivers/i2c/i2c-boardinfo.c b/drivers/i2c/i2c-boardinfo.c index f24cc64e2e8c..90e322959303 100644 --- a/drivers/i2c/i2c-boardinfo.c +++ b/drivers/i2c/i2c-boardinfo.c | |||
@@ -10,11 +10,6 @@ | |||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | ||
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 | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301 USA. | ||
18 | */ | 13 | */ |
19 | 14 | ||
20 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 2f90ac6a7f79..f43b4e11647a 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -10,12 +10,7 @@ | |||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. */ |
14 | |||
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 | ||
17 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
18 | MA 02110-1301 USA. */ | ||
19 | /* ------------------------------------------------------------------------- */ | 14 | /* ------------------------------------------------------------------------- */ |
20 | 15 | ||
21 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi>. | 16 | /* With some changes from Kyösti Mälkki <kmalkki@cc.hut.fi>. |
@@ -670,6 +665,9 @@ static int i2c_device_remove(struct device *dev) | |||
670 | status = driver->remove(client); | 665 | status = driver->remove(client); |
671 | } | 666 | } |
672 | 667 | ||
668 | if (dev->of_node) | ||
669 | irq_dispose_mapping(client->irq); | ||
670 | |||
673 | dev_pm_domain_detach(&client->dev, true); | 671 | dev_pm_domain_detach(&client->dev, true); |
674 | return status; | 672 | return status; |
675 | } | 673 | } |
diff --git a/drivers/i2c/i2c-core.h b/drivers/i2c/i2c-core.h index 18a8fd21d2c2..17700bfddcf5 100644 --- a/drivers/i2c/i2c-core.h +++ b/drivers/i2c/i2c-core.h | |||
@@ -10,11 +10,6 @@ | |||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | ||
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 | ||
16 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
17 | * MA 02110-1301 USA. | ||
18 | */ | 13 | */ |
19 | 14 | ||
20 | #include <linux/rwsem.h> | 15 | #include <linux/rwsem.h> |
diff --git a/drivers/i2c/i2c-dev.c b/drivers/i2c/i2c-dev.c index 80b47e8ce030..71c7a3975b62 100644 --- a/drivers/i2c/i2c-dev.c +++ b/drivers/i2c/i2c-dev.c | |||
@@ -14,11 +14,6 @@ | |||
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU General Public License for more details. | 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., 51 Franklin Street, Fifth Floor, Boston, | ||
21 | MA 02110-1301 USA. | ||
22 | */ | 17 | */ |
23 | 18 | ||
24 | /* Note that this is a complete rewrite of Simon Vogl's i2c-dev module. | 19 | /* 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 fc99f0d6b4a5..9ebf9cb4ad7a 100644 --- a/drivers/i2c/i2c-smbus.c +++ b/drivers/i2c/i2c-smbus.c | |||
@@ -13,11 +13,6 @@ | |||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * GNU General Public License for more details. | 15 | * GNU General Public License for more details. |
16 | * | ||
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 | ||
19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
20 | * MA 02110-1301 USA. | ||
21 | */ | 16 | */ |
22 | 17 | ||
23 | #include <linux/kernel.h> | 18 | #include <linux/kernel.h> |
diff --git a/drivers/i2c/i2c-stub.c b/drivers/i2c/i2c-stub.c index d241aa295d96..af2a94e1140b 100644 --- a/drivers/i2c/i2c-stub.c +++ b/drivers/i2c/i2c-stub.c | |||
@@ -13,10 +13,6 @@ | |||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | GNU General Public License for more details. | 15 | GNU General Public License for more details. |
16 | |||
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 | ||
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | */ | 16 | */ |
21 | 17 | ||
22 | #define DEBUG 1 | 18 | #define DEBUG 1 |