From 45ccc6c50dfd227b40122fea649b5fc887caa174 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 12 Dec 2007 13:45:24 +0100 Subject: i2c: Delete an outdated piece of documentation I'm amazed that this old piece of documentation managed to survive until today. Signed-off-by: Jean Delvare --- Documentation/i2c/summary | 45 ++++----------------------------------------- 1 file changed, 4 insertions(+), 41 deletions(-) diff --git a/Documentation/i2c/summary b/Documentation/i2c/summary index 003c7319b8c..13ab076dcd9 100644 --- a/Documentation/i2c/summary +++ b/Documentation/i2c/summary @@ -1,5 +1,3 @@ -This is an explanation of what i2c is, and what is supported in this package. - I2C and SMBus ============= @@ -33,52 +31,17 @@ When we talk about I2C, we use the following terms: Client An Algorithm driver contains general code that can be used for a whole class -of I2C adapters. Each specific adapter driver depends on one algorithm -driver. +of I2C adapters. Each specific adapter driver either depends on one algorithm +driver, or includes its own implementation. A Driver driver (yes, this sounds ridiculous, sorry) contains the general code to access some type of device. Each detected device gets its own data in the Client structure. Usually, Driver and Client are more closely integrated than Algorithm and Adapter. -For a given configuration, you will need a driver for your I2C bus (usually -a separate Adapter and Algorithm driver), and drivers for your I2C devices -(usually one driver for each device). There are no I2C device drivers -in this package. See the lm_sensors project http://www.lm-sensors.nu -for device drivers. +For a given configuration, you will need a driver for your I2C bus, and +drivers for your I2C devices (usually one driver for each device). At this time, Linux only operates I2C (or SMBus) in master mode; you can't use these APIs to make a Linux system behave as a slave/device, either to speak a custom protocol or to emulate some other device. - - -Included Bus Drivers -==================== -Note that only stable drivers are patched into the kernel by 'mkpatch'. - - -Base modules ------------- - -i2c-core: The basic I2C code, including the /proc/bus/i2c* interface -i2c-dev: The /dev/i2c-* interface -i2c-proc: The /proc/sys/dev/sensors interface for device (client) drivers - -Algorithm drivers ------------------ - -i2c-algo-bit: A bit-banging algorithm -i2c-algo-pcf: A PCF 8584 style algorithm -i2c-algo-ibm_ocp: An algorithm for the I2C device in IBM 4xx processors (NOT BUILT BY DEFAULT) - -Adapter drivers ---------------- - -i2c-elektor: Elektor ISA card (uses i2c-algo-pcf) -i2c-elv: ELV parallel port adapter (uses i2c-algo-bit) -i2c-pcf-epp: PCF8584 on a EPP parallel port (uses i2c-algo-pcf) (NOT mkpatched) -i2c-philips-par: Philips style parallel port adapter (uses i2c-algo-bit) -i2c-adap-ibm_ocp: IBM 4xx processor I2C device (uses i2c-algo-ibm_ocp) (NOT BUILT BY DEFAULT) -i2c-pport: Primitive parallel port adapter (uses i2c-algo-bit) -i2c-velleman: Velleman K8000 parallel port adapter (uses i2c-algo-bit) - -- cgit v1.2.3-70-g09d2 From 50862d9490e8fbb317040b3faeee7caf56c00025 Mon Sep 17 00:00:00 2001 From: Atsushi Nemoto Date: Wed, 12 Dec 2007 13:45:24 +0100 Subject: i2c-gpio: Initialize adapter class This is required to let hwmon drivers attach to the adapter. Signed-off-by: Atsushi Nemoto Signed-off-by: Jean Delvare --- drivers/i2c/busses/i2c-gpio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i2c/busses/i2c-gpio.c b/drivers/i2c/busses/i2c-gpio.c index 44e1cd21bb0..3ca19fc234f 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) adap->owner = THIS_MODULE; snprintf(adap->name, sizeof(adap->name), "i2c-gpio%d", pdev->id); adap->algo_data = bit_data; + adap->class = I2C_CLASS_HWMON; adap->dev.parent = &pdev->dev; /* -- cgit v1.2.3-70-g09d2 From fce3ff03311e0397e2867cce67d4ccf31707a1ea Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Wed, 12 Dec 2007 13:45:24 +0100 Subject: i2c: Add missing spaces in split log messages Signed-off-by: Joe Perches Signed-off-by: Jean Delvare --- drivers/i2c/busses/i2c-davinci.c | 4 ++-- drivers/i2c/busses/i2c-omap.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-davinci.c b/drivers/i2c/busses/i2c-davinci.c index bd7aaff3524..67679882ebe 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) DAVINCI_I2C_STR_REG, w); } else - dev_err(dev->dev, "RDR IRQ while no" + dev_err(dev->dev, "RDR IRQ while no " "data requested\n"); break; @@ -423,7 +423,7 @@ static irqreturn_t i2c_davinci_isr(int this_irq, void *dev_id) DAVINCI_I2C_IMR_REG, w); } else - dev_err(dev->dev, "TDR IRQ while no data to" + dev_err(dev->dev, "TDR IRQ while no data to " "send\n"); break; diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index 89a30028ddb..cb55cf2ba1e 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) while (!(omap_i2c_read_reg(dev, OMAP_I2C_SYSS_REG) & OMAP_I2C_SYSS_RDONE)) { if (time_after(jiffies, timeout)) { - dev_warn(dev->dev, "timeout waiting" + dev_warn(dev->dev, "timeout waiting " "for controller reset\n"); return -ETIMEDOUT; } @@ -483,7 +483,7 @@ omap_i2c_isr(int this_irq, void *dev_id) dev->buf_len--; } } else - dev_err(dev->dev, "RRDY IRQ while no data" + dev_err(dev->dev, "RRDY IRQ while no data " "requested\n"); omap_i2c_ack_stat(dev, OMAP_I2C_STAT_RRDY); continue; @@ -498,7 +498,7 @@ omap_i2c_isr(int this_irq, void *dev_id) dev->buf_len--; } } else - dev_err(dev->dev, "XRDY IRQ while no" + dev_err(dev->dev, "XRDY IRQ while no " "data to send\n"); omap_i2c_write_reg(dev, OMAP_I2C_DATA_REG, w); omap_i2c_ack_stat(dev, OMAP_I2C_STAT_XRDY); -- cgit v1.2.3-70-g09d2 From 187426e69afe0a2ad697c9c5f5f654254da0e3a0 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Wed, 12 Dec 2007 13:45:25 +0100 Subject: i2c/isp1301_omap: Build fix Build fix to the isp1301_omap driver ... this driver gets built more often in the OMAP tree than in mainline, partly because the defconfig for H2 (plus probably H3 and H4) needs updating. Signed-off-by: David Brownell Signed-off-by: Jean Delvare --- drivers/i2c/chips/isp1301_omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/chips/isp1301_omap.c b/drivers/i2c/chips/isp1301_omap.c index fe04e46991a..b767603a07b 100644 --- a/drivers/i2c/chips/isp1301_omap.c +++ b/drivers/i2c/chips/isp1301_omap.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include -- cgit v1.2.3-70-g09d2