aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/i2c/chips/pca9539
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-22 13:42:54 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-22 13:42:54 -0400
commit4e93d3e8859c834ee18dfd33051d24df8669d0c0 (patch)
tree13f5b39730857257b5040471618e9bcce30ed9cc /Documentation/i2c/chips/pca9539
parenta0cd30fd26a398c0c6e50c6760610d4529f17a84 (diff)
parent0087e5ef577d0d6e664be7ab4be513b6a482e7ec (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
Diffstat (limited to 'Documentation/i2c/chips/pca9539')
-rw-r--r--Documentation/i2c/chips/pca953947
1 files changed, 47 insertions, 0 deletions
diff --git a/Documentation/i2c/chips/pca9539 b/Documentation/i2c/chips/pca9539
new file mode 100644
index 000000000000..c4fce6a13537
--- /dev/null
+++ b/Documentation/i2c/chips/pca9539
@@ -0,0 +1,47 @@
1Kernel driver pca9539
2=====================
3
4Supported chips:
5 * Philips PCA9539
6 Prefix: 'pca9539'
7 Addresses scanned: 0x74 - 0x77
8 Datasheet:
9 http://www.semiconductors.philips.com/acrobat/datasheets/PCA9539_2.pdf
10
11Author: Ben Gardner <bgardner@wabtec.com>
12
13
14Description
15-----------
16
17The Philips PCA9539 is a 16 bit low power I/O device.
18All 16 lines can be individually configured as an input or output.
19The input sense can also be inverted.
20The 16 lines are split between two bytes.
21
22
23Sysfs entries
24-------------
25
26Each is a byte that maps to the 8 I/O bits.
27A '0' suffix is for bits 0-7, while '1' is for bits 8-15.
28
29input[01] - read the current value
30output[01] - sets the output value
31direction[01] - direction of each bit: 1=input, 0=output
32invert[01] - toggle the input bit sense
33
34input reads the actual state of the line and is always available.
35The direction defaults to input for all channels.
36
37
38General Remarks
39---------------
40
41Note that each output, direction, and invert entry controls 8 lines.
42You should use the read, modify, write sequence.
43For example. to set output bit 0 of 1.
44 val=$(cat output0)
45 val=$(( $val | 1 ))
46 echo $val > output0
47