aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/i2c/summary45
-rw-r--r--drivers/i2c/busses/i2c-davinci.c4
-rw-r--r--drivers/i2c/busses/i2c-gpio.c1
-rw-r--r--drivers/i2c/busses/i2c-omap.c6
-rw-r--r--drivers/i2c/chips/isp1301_omap.c2
5 files changed, 11 insertions, 47 deletions
diff --git a/Documentation/i2c/summary b/Documentation/i2c/summary
index 003c7319b8c7..13ab076dcd92 100644
--- a/Documentation/i2c/summary
+++ b/Documentation/i2c/summary
@@ -1,5 +1,3 @@
1This is an explanation of what i2c is, and what is supported in this package.
2
3I2C and SMBus 1I2C and SMBus
4============= 2=============
5 3
@@ -33,52 +31,17 @@ When we talk about I2C, we use the following terms:
33 Client 31 Client
34 32
35An Algorithm driver contains general code that can be used for a whole class 33An Algorithm driver contains general code that can be used for a whole class
36of I2C adapters. Each specific adapter driver depends on one algorithm 34of I2C adapters. Each specific adapter driver either depends on one algorithm
37driver. 35driver, or includes its own implementation.
38 36
39A Driver driver (yes, this sounds ridiculous, sorry) contains the general 37A Driver driver (yes, this sounds ridiculous, sorry) contains the general
40code to access some type of device. Each detected device gets its own 38code to access some type of device. Each detected device gets its own
41data in the Client structure. Usually, Driver and Client are more closely 39data in the Client structure. Usually, Driver and Client are more closely
42integrated than Algorithm and Adapter. 40integrated than Algorithm and Adapter.
43 41
44For a given configuration, you will need a driver for your I2C bus (usually 42For a given configuration, you will need a driver for your I2C bus, and
45a separate Adapter and Algorithm driver), and drivers for your I2C devices 43drivers for your I2C devices (usually one driver for each device).
46(usually one driver for each device). There are no I2C device drivers
47in this package. See the lm_sensors project http://www.lm-sensors.nu
48for device drivers.
49 44
50At this time, Linux only operates I2C (or SMBus) in master mode; you can't 45At this time, Linux only operates I2C (or SMBus) in master mode; you can't
51use these APIs to make a Linux system behave as a slave/device, either to 46use these APIs to make a Linux system behave as a slave/device, either to
52speak a custom protocol or to emulate some other device. 47speak a custom protocol or to emulate some other device.
53
54
55Included Bus Drivers
56====================
57Note that only stable drivers are patched into the kernel by 'mkpatch'.
58
59
60Base modules
61------------
62
63i2c-core: The basic I2C code, including the /proc/bus/i2c* interface
64i2c-dev: The /dev/i2c-* interface
65i2c-proc: The /proc/sys/dev/sensors interface for device (client) drivers
66
67Algorithm drivers
68-----------------
69
70i2c-algo-bit: A bit-banging algorithm
71i2c-algo-pcf: A PCF 8584 style algorithm
72i2c-algo-ibm_ocp: An algorithm for the I2C device in IBM 4xx processors (NOT BUILT BY DEFAULT)
73
74Adapter drivers
75---------------
76
77i2c-elektor: Elektor ISA card (uses i2c-algo-pcf)
78i2c-elv: ELV parallel port adapter (uses i2c-algo-bit)
79i2c-pcf-epp: PCF8584 on a EPP parallel port (uses i2c-algo-pcf) (NOT mkpatched)
80i2c-philips-par: Philips style parallel port adapter (uses i2c-algo-bit)
81i2c-adap-ibm_ocp: IBM 4xx processor I2C device (uses i2c-algo-ibm_ocp) (NOT BUILT BY DEFAULT)
82i2c-pport: Primitive parallel port adapter (uses i2c-algo-bit)
83i2c-velleman: Velleman K8000 parallel port adapter (uses i2c-algo-bit)
84
diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c
index bd7aaff35240..67679882ebef 100644
--- a/drivers/i2c/busses/i2c-davinci.c
+++ b/drivers/i2c/busses/i2c-davinci.c
@@ -404,7 +404,7 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id)
404 DAVINCI_I2C_STR_REG, 404 DAVINCI_I2C_STR_REG,
405 w); 405 w);
406 } else 406 } else
407 dev_err(dev->dev, "RDR IRQ while no" 407 dev_err(dev->dev, "RDR IRQ while no "
408 "data requested\n"); 408 "data requested\n");
409 break; 409 break;
410 410
@@ -423,7 +423,7 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id)
423 DAVINCI_I2C_IMR_REG, 423 DAVINCI_I2C_IMR_REG,
424 w); 424 w);
425 } else 425 } else
426 dev_err(dev->dev, "TDR IRQ while no data to" 426 dev_err(dev->dev, "TDR IRQ while no data to "
427 "send\n"); 427 "send\n");
428 break; 428 break;
429 429
diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c
index 44e1cd21bb01..3ca19fc234fb 100644
--- a/drivers/i2c/busses/i2c-gpio.c
+++ b/drivers/i2c/busses/i2c-gpio.c
@@ -140,6 +140,7 @@ static int __init i2c_gpio_probe(struct platform_device *pdev)
140 adap->owner = THIS_MODULE; 140 adap->owner = THIS_MODULE;
141 snprintf(adap->name, sizeof(adap->name), "i2c-gpio%d", pdev->id); 141 snprintf(adap->name, sizeof(adap->name), "i2c-gpio%d", pdev->id);
142 adap->algo_data = bit_data; 142 adap->algo_data = bit_data;
143 adap->class = I2C_CLASS_HWMON;
143 adap->dev.parent = &pdev->dev; 144 adap->dev.parent = &pdev->dev;
144 145
145 /* 146 /*
diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
index 89a30028ddb6..cb55cf2ba1e9 100644
--- a/drivers/i2c/busses/i2c-omap.c
+++ b/drivers/i2c/busses/i2c-omap.c
@@ -203,7 +203,7 @@ static int omap_i2c_init(struct omap_i2c_dev *dev)
203 while (!(omap_i2c_read_reg(dev, OMAP_I2C_SYSS_REG) & 203 while (!(omap_i2c_read_reg(dev, OMAP_I2C_SYSS_REG) &
204 OMAP_I2C_SYSS_RDONE)) { 204 OMAP_I2C_SYSS_RDONE)) {
205 if (time_after(jiffies, timeout)) { 205 if (time_after(jiffies, timeout)) {
206 dev_warn(dev->dev, "timeout waiting" 206 dev_warn(dev->dev, "timeout waiting "
207 "for controller reset\n"); 207 "for controller reset\n");
208 return -ETIMEDOUT; 208 return -ETIMEDOUT;
209 } 209 }
@@ -483,7 +483,7 @@ omap_i2c_isr(int this_irq, void *dev_id)
483 dev->buf_len--; 483 dev->buf_len--;
484 } 484 }
485 } else 485 } else
486 dev_err(dev->dev, "RRDY IRQ while no data" 486 dev_err(dev->dev, "RRDY IRQ while no data "
487 "requested\n"); 487 "requested\n");
488 omap_i2c_ack_stat(dev, OMAP_I2C_STAT_RRDY); 488 omap_i2c_ack_stat(dev, OMAP_I2C_STAT_RRDY);
489 continue; 489 continue;
@@ -498,7 +498,7 @@ omap_i2c_isr(int this_irq, void *dev_id)
498 dev->buf_len--; 498 dev->buf_len--;
499 } 499 }
500 } else 500 } else
501 dev_err(dev->dev, "XRDY IRQ while no" 501 dev_err(dev->dev, "XRDY IRQ while no "
502 "data to send\n"); 502 "data to send\n");
503 omap_i2c_write_reg(dev, OMAP_I2C_DATA_REG, w); 503 omap_i2c_write_reg(dev, OMAP_I2C_DATA_REG, w);
504 omap_i2c_ack_stat(dev, OMAP_I2C_STAT_XRDY); 504 omap_i2c_ack_stat(dev, OMAP_I2C_STAT_XRDY);
diff --git a/drivers/i2c/chips/isp1301_omap.c b/drivers/i2c/chips/isp1301_omap.c
index fe04e46991aa..b767603a07ba 100644
--- a/drivers/i2c/chips/isp1301_omap.c
+++ b/drivers/i2c/chips/isp1301_omap.c
@@ -26,7 +26,7 @@
26#include <linux/interrupt.h> 26#include <linux/interrupt.h>
27#include <linux/platform_device.h> 27#include <linux/platform_device.h>
28#include <linux/usb/ch9.h> 28#include <linux/usb/ch9.h>
29#include <linux/usb_gadget.h> 29#include <linux/usb/gadget.h>
30#include <linux/usb.h> 30#include <linux/usb.h>
31#include <linux/usb/otg.h> 31#include <linux/usb/otg.h>
32#include <linux/i2c.h> 32#include <linux/i2c.h>