diff options
Diffstat (limited to 'Documentation/i2c')
-rw-r--r-- | Documentation/i2c/busses/i2c-i801 | 5 | ||||
-rw-r--r-- | Documentation/i2c/busses/i2c-viapro | 3 | ||||
-rw-r--r-- | Documentation/i2c/chips/pca9539 | 3 | ||||
-rw-r--r-- | Documentation/i2c/chips/pcf8575 | 72 | ||||
-rw-r--r-- | Documentation/i2c/i2c-stub | 6 | ||||
-rw-r--r-- | Documentation/i2c/summary | 45 | ||||
-rw-r--r-- | Documentation/i2c/writing-clients | 6 |
7 files changed, 89 insertions, 51 deletions
diff --git a/Documentation/i2c/busses/i2c-i801 b/Documentation/i2c/busses/i2c-i801 index fde4420e3f75..3bd958360159 100644 --- a/Documentation/i2c/busses/i2c-i801 +++ b/Documentation/i2c/busses/i2c-i801 | |||
@@ -17,9 +17,8 @@ Supported adapters: | |||
17 | Datasheets: Publicly available at the Intel website | 17 | Datasheets: Publicly available at the Intel website |
18 | 18 | ||
19 | Authors: | 19 | Authors: |
20 | Frodo Looijaard <frodol@dds.nl>, | ||
21 | Philip Edelbrock <phil@netroedge.com>, | ||
22 | Mark Studebaker <mdsxyz123@yahoo.com> | 20 | Mark Studebaker <mdsxyz123@yahoo.com> |
21 | Jean Delvare <khali@linux-fr.org> | ||
23 | 22 | ||
24 | 23 | ||
25 | Module Parameters | 24 | Module Parameters |
@@ -62,7 +61,7 @@ Not supported. | |||
62 | I2C Block Read Support | 61 | I2C Block Read Support |
63 | ---------------------- | 62 | ---------------------- |
64 | 63 | ||
65 | Not supported at the moment. | 64 | I2C block read is supported on the 82801EB (ICH5) and later chips. |
66 | 65 | ||
67 | 66 | ||
68 | SMBus 2.0 Support | 67 | SMBus 2.0 Support |
diff --git a/Documentation/i2c/busses/i2c-viapro b/Documentation/i2c/busses/i2c-viapro index 06b4be3ef6d8..1405fb69984c 100644 --- a/Documentation/i2c/busses/i2c-viapro +++ b/Documentation/i2c/busses/i2c-viapro | |||
@@ -10,7 +10,7 @@ Supported adapters: | |||
10 | * VIA Technologies, Inc. VT8231, VT8233, VT8233A | 10 | * VIA Technologies, Inc. VT8231, VT8233, VT8233A |
11 | Datasheet: available on request from VIA | 11 | Datasheet: available on request from VIA |
12 | 12 | ||
13 | * VIA Technologies, Inc. VT8235, VT8237R, VT8237A, VT8251 | 13 | * VIA Technologies, Inc. VT8235, VT8237R, VT8237A, VT8237S, VT8251 |
14 | Datasheet: available on request and under NDA from VIA | 14 | Datasheet: available on request and under NDA from VIA |
15 | 15 | ||
16 | * VIA Technologies, Inc. CX700 | 16 | * VIA Technologies, Inc. CX700 |
@@ -46,6 +46,7 @@ Your lspci -n listing must show one of these : | |||
46 | device 1106:3177 (VT8235) | 46 | device 1106:3177 (VT8235) |
47 | device 1106:3227 (VT8237R) | 47 | device 1106:3227 (VT8237R) |
48 | device 1106:3337 (VT8237A) | 48 | device 1106:3337 (VT8237A) |
49 | device 1106:3372 (VT8237S) | ||
49 | device 1106:3287 (VT8251) | 50 | device 1106:3287 (VT8251) |
50 | device 1106:8324 (CX700) | 51 | device 1106:8324 (CX700) |
51 | 52 | ||
diff --git a/Documentation/i2c/chips/pca9539 b/Documentation/i2c/chips/pca9539 index c4fce6a13537..1d81c530c4a5 100644 --- a/Documentation/i2c/chips/pca9539 +++ b/Documentation/i2c/chips/pca9539 | |||
@@ -1,6 +1,9 @@ | |||
1 | Kernel driver pca9539 | 1 | Kernel driver pca9539 |
2 | ===================== | 2 | ===================== |
3 | 3 | ||
4 | NOTE: this driver is deprecated and will be dropped soon, use | ||
5 | drivers/gpio/pca9539.c instead. | ||
6 | |||
4 | Supported chips: | 7 | Supported chips: |
5 | * Philips PCA9539 | 8 | * Philips PCA9539 |
6 | Prefix: 'pca9539' | 9 | Prefix: 'pca9539' |
diff --git a/Documentation/i2c/chips/pcf8575 b/Documentation/i2c/chips/pcf8575 new file mode 100644 index 000000000000..25f5698a61cf --- /dev/null +++ b/Documentation/i2c/chips/pcf8575 | |||
@@ -0,0 +1,72 @@ | |||
1 | About the PCF8575 chip and the pcf8575 kernel driver | ||
2 | ==================================================== | ||
3 | |||
4 | The PCF8575 chip is produced by the following manufacturers: | ||
5 | |||
6 | * Philips NXP | ||
7 | http://www.nxp.com/#/pip/cb=[type=product,path=50807/41735/41850,final=PCF8575_3]|pip=[pip=PCF8575_3][0] | ||
8 | |||
9 | * Texas Instruments | ||
10 | http://focus.ti.com/docs/prod/folders/print/pcf8575.html | ||
11 | |||
12 | |||
13 | Some vendors sell small PCB's with the PCF8575 mounted on it. You can connect | ||
14 | such a board to a Linux host via e.g. an USB to I2C interface. Examples of | ||
15 | PCB boards with a PCF8575: | ||
16 | |||
17 | * SFE Breakout Board for PCF8575 I2C Expander by RobotShop | ||
18 | http://www.robotshop.ca/home/products/robot-parts/electronics/adapters-converters/sfe-pcf8575-i2c-expander-board.html | ||
19 | |||
20 | * Breakout Board for PCF8575 I2C Expander by Spark Fun Electronics | ||
21 | http://www.sparkfun.com/commerce/product_info.php?products_id=8130 | ||
22 | |||
23 | |||
24 | Description | ||
25 | ----------- | ||
26 | The PCF8575 chip is a 16-bit I/O expander for the I2C bus. Up to eight of | ||
27 | these chips can be connected to the same I2C bus. You can find this | ||
28 | chip on some custom designed hardware, but you won't find it on PC | ||
29 | motherboards. | ||
30 | |||
31 | The PCF8575 chip consists of a 16-bit quasi-bidirectional port and an I2C-bus | ||
32 | interface. Each of the sixteen I/O's can be independently used as an input or | ||
33 | an output. To set up an I/O pin as an input, you have to write a 1 to the | ||
34 | corresponding output. | ||
35 | |||
36 | For more information please see the datasheet. | ||
37 | |||
38 | |||
39 | Detection | ||
40 | --------- | ||
41 | |||
42 | There is no method known to detect whether a chip on a given I2C address is | ||
43 | a PCF8575 or whether it is any other I2C device. So there are two alternatives | ||
44 | to let the driver find the installed PCF8575 devices: | ||
45 | - Load this driver after any other I2C driver for I2C devices with addresses | ||
46 | in the range 0x20 .. 0x27. | ||
47 | - Pass the I2C bus and address of the installed PCF8575 devices explicitly to | ||
48 | the driver at load time via the probe=... or force=... parameters. | ||
49 | |||
50 | /sys interface | ||
51 | -------------- | ||
52 | |||
53 | For each address on which a PCF8575 chip was found or forced the following | ||
54 | files will be created under /sys: | ||
55 | * /sys/bus/i2c/devices/<bus>-<address>/read | ||
56 | * /sys/bus/i2c/devices/<bus>-<address>/write | ||
57 | where bus is the I2C bus number (0, 1, ...) and address is the four-digit | ||
58 | hexadecimal representation of the 7-bit I2C address of the PCF8575 | ||
59 | (0020 .. 0027). | ||
60 | |||
61 | The read file is read-only. Reading it will trigger an I2C read and will hence | ||
62 | report the current input state for the pins configured as inputs, and the | ||
63 | current output value for the pins configured as outputs. | ||
64 | |||
65 | The write file is read-write. Writing a value to it will configure all pins | ||
66 | as output for which the corresponding bit is zero. Reading the write file will | ||
67 | return the value last written, or -EAGAIN if no value has yet been written to | ||
68 | the write file. | ||
69 | |||
70 | On module initialization the configuration of the chip is not changed -- the | ||
71 | chip is left in the state it was already configured in through either power-up | ||
72 | or through previous I2C write actions. | ||
diff --git a/Documentation/i2c/i2c-stub b/Documentation/i2c/i2c-stub index 89e69ad3436c..0d8be1c20c16 100644 --- a/Documentation/i2c/i2c-stub +++ b/Documentation/i2c/i2c-stub | |||
@@ -25,6 +25,9 @@ The typical use-case is like this: | |||
25 | 3. load the target sensors chip driver module | 25 | 3. load the target sensors chip driver module |
26 | 4. observe its behavior in the kernel log | 26 | 4. observe its behavior in the kernel log |
27 | 27 | ||
28 | There's a script named i2c-stub-from-dump in the i2c-tools package which | ||
29 | can load register values automatically from a chip dump. | ||
30 | |||
28 | PARAMETERS: | 31 | PARAMETERS: |
29 | 32 | ||
30 | int chip_addr[10]: | 33 | int chip_addr[10]: |
@@ -32,9 +35,6 @@ int chip_addr[10]: | |||
32 | 35 | ||
33 | CAVEATS: | 36 | CAVEATS: |
34 | 37 | ||
35 | There are independent arrays for byte/data and word/data commands. Depending | ||
36 | on if/how a target driver mixes them, you'll need to be careful. | ||
37 | |||
38 | If your target driver polls some byte or word waiting for it to change, the | 38 | If your target driver polls some byte or word waiting for it to change, the |
39 | stub could lock it up. Use i2cset to unlock it. | 39 | stub could lock it up. Use i2cset to unlock it. |
40 | 40 | ||
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 @@ | |||
1 | This is an explanation of what i2c is, and what is supported in this package. | ||
2 | |||
3 | I2C and SMBus | 1 | I2C 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 | ||
35 | An Algorithm driver contains general code that can be used for a whole class | 33 | An Algorithm driver contains general code that can be used for a whole class |
36 | of I2C adapters. Each specific adapter driver depends on one algorithm | 34 | of I2C adapters. Each specific adapter driver either depends on one algorithm |
37 | driver. | 35 | driver, or includes its own implementation. |
38 | 36 | ||
39 | A Driver driver (yes, this sounds ridiculous, sorry) contains the general | 37 | A Driver driver (yes, this sounds ridiculous, sorry) contains the general |
40 | code to access some type of device. Each detected device gets its own | 38 | code to access some type of device. Each detected device gets its own |
41 | data in the Client structure. Usually, Driver and Client are more closely | 39 | data in the Client structure. Usually, Driver and Client are more closely |
42 | integrated than Algorithm and Adapter. | 40 | integrated than Algorithm and Adapter. |
43 | 41 | ||
44 | For a given configuration, you will need a driver for your I2C bus (usually | 42 | For a given configuration, you will need a driver for your I2C bus, and |
45 | a separate Adapter and Algorithm driver), and drivers for your I2C devices | 43 | drivers for your I2C devices (usually one driver for each device). |
46 | (usually one driver for each device). There are no I2C device drivers | ||
47 | in this package. See the lm_sensors project http://www.lm-sensors.nu | ||
48 | for device drivers. | ||
49 | 44 | ||
50 | At this time, Linux only operates I2C (or SMBus) in master mode; you can't | 45 | At this time, Linux only operates I2C (or SMBus) in master mode; you can't |
51 | use these APIs to make a Linux system behave as a slave/device, either to | 46 | use these APIs to make a Linux system behave as a slave/device, either to |
52 | speak a custom protocol or to emulate some other device. | 47 | speak a custom protocol or to emulate some other device. |
53 | |||
54 | |||
55 | Included Bus Drivers | ||
56 | ==================== | ||
57 | Note that only stable drivers are patched into the kernel by 'mkpatch'. | ||
58 | |||
59 | |||
60 | Base modules | ||
61 | ------------ | ||
62 | |||
63 | i2c-core: The basic I2C code, including the /proc/bus/i2c* interface | ||
64 | i2c-dev: The /dev/i2c-* interface | ||
65 | i2c-proc: The /proc/sys/dev/sensors interface for device (client) drivers | ||
66 | |||
67 | Algorithm drivers | ||
68 | ----------------- | ||
69 | |||
70 | i2c-algo-bit: A bit-banging algorithm | ||
71 | i2c-algo-pcf: A PCF 8584 style algorithm | ||
72 | i2c-algo-ibm_ocp: An algorithm for the I2C device in IBM 4xx processors (NOT BUILT BY DEFAULT) | ||
73 | |||
74 | Adapter drivers | ||
75 | --------------- | ||
76 | |||
77 | i2c-elektor: Elektor ISA card (uses i2c-algo-pcf) | ||
78 | i2c-elv: ELV parallel port adapter (uses i2c-algo-bit) | ||
79 | i2c-pcf-epp: PCF8584 on a EPP parallel port (uses i2c-algo-pcf) (NOT mkpatched) | ||
80 | i2c-philips-par: Philips style parallel port adapter (uses i2c-algo-bit) | ||
81 | i2c-adap-ibm_ocp: IBM 4xx processor I2C device (uses i2c-algo-ibm_ocp) (NOT BUILT BY DEFAULT) | ||
82 | i2c-pport: Primitive parallel port adapter (uses i2c-algo-bit) | ||
83 | i2c-velleman: Velleman K8000 parallel port adapter (uses i2c-algo-bit) | ||
84 | |||
diff --git a/Documentation/i2c/writing-clients b/Documentation/i2c/writing-clients index 2c170032bf37..bfb0a5520817 100644 --- a/Documentation/i2c/writing-clients +++ b/Documentation/i2c/writing-clients | |||
@@ -267,9 +267,9 @@ insmod parameter of the form force_<kind>. | |||
267 | Fortunately, as a module writer, you just have to define the `normal_i2c' | 267 | Fortunately, as a module writer, you just have to define the `normal_i2c' |
268 | parameter. The complete declaration could look like this: | 268 | parameter. The complete declaration could look like this: |
269 | 269 | ||
270 | /* Scan 0x37, and 0x48 to 0x4f */ | 270 | /* Scan 0x4c to 0x4f */ |
271 | static unsigned short normal_i2c[] = { 0x37, 0x48, 0x49, 0x4a, 0x4b, 0x4c, | 271 | static const unsigned short normal_i2c[] = { 0x4c, 0x4d, 0x4e, 0x4f, |
272 | 0x4d, 0x4e, 0x4f, I2C_CLIENT_END }; | 272 | I2C_CLIENT_END }; |
273 | 273 | ||
274 | /* Magic definition of all other variables and things */ | 274 | /* Magic definition of all other variables and things */ |
275 | I2C_CLIENT_INSMOD; | 275 | I2C_CLIENT_INSMOD; |