aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/i2c
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@gmail.com>2008-01-27 12:14:45 -0500
committerJean Delvare <khali@hyperion.delvare>2008-01-27 12:14:45 -0500
commit5864ae03ca982fb60bedeebfd67562db37c1ee6a (patch)
treea2c0982c544be712246e797451abb7bf850492e7 /Documentation/i2c
parent217bcec4425cdc8fb90ce688eb4d5b5140713046 (diff)
i2c: Add support for the PCF8575 chip
Signed-off-by: Bart Van Assche <bart.vanassche@gmail.com> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'Documentation/i2c')
-rw-r--r--Documentation/i2c/chips/pcf857572
1 files changed, 72 insertions, 0 deletions
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 @@
1About the PCF8575 chip and the pcf8575 kernel driver
2====================================================
3
4The 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
13Some vendors sell small PCB's with the PCF8575 mounted on it. You can connect
14such a board to a Linux host via e.g. an USB to I2C interface. Examples of
15PCB 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
24Description
25-----------
26The PCF8575 chip is a 16-bit I/O expander for the I2C bus. Up to eight of
27these chips can be connected to the same I2C bus. You can find this
28chip on some custom designed hardware, but you won't find it on PC
29motherboards.
30
31The PCF8575 chip consists of a 16-bit quasi-bidirectional port and an I2C-bus
32interface. Each of the sixteen I/O's can be independently used as an input or
33an output. To set up an I/O pin as an input, you have to write a 1 to the
34corresponding output.
35
36For more information please see the datasheet.
37
38
39Detection
40---------
41
42There is no method known to detect whether a chip on a given I2C address is
43a PCF8575 or whether it is any other I2C device. So there are two alternatives
44to 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
53For each address on which a PCF8575 chip was found or forced the following
54files will be created under /sys:
55* /sys/bus/i2c/devices/<bus>-<address>/read
56* /sys/bus/i2c/devices/<bus>-<address>/write
57where bus is the I2C bus number (0, 1, ...) and address is the four-digit
58hexadecimal representation of the 7-bit I2C address of the PCF8575
59(0020 .. 0027).
60
61The read file is read-only. Reading it will trigger an I2C read and will hence
62report the current input state for the pins configured as inputs, and the
63current output value for the pins configured as outputs.
64
65The write file is read-write. Writing a value to it will configure all pins
66as output for which the corresponding bit is zero. Reading the write file will
67return the value last written, or -EAGAIN if no value has yet been written to
68the write file.
69
70On module initialization the configuration of the chip is not changed -- the
71chip is left in the state it was already configured in through either power-up
72or through previous I2C write actions.