diff options
author | bgardner@wabtec.com <bgardner@wabtec.com> | 2005-06-07 09:55:38 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-22 00:52:05 -0400 |
commit | 69dd204b6b45987dbf9ce7058cd238d355865281 (patch) | |
tree | e033f9697109d4a411e5c6707b0e6991e00ede7f /Documentation | |
parent | 10c08f8100ee2c4d27b862635574cdf4ef439e67 (diff) |
[PATCH] I2C: add new pca9539 driver
This is an i2c driver for the Philips PCA9539 (16 bit I/O port).
It uses the new i2c-sysfs interfaces.
The patch includes documentation.
It depends on the patch that renames "i2c-sysfs.h" to "hwmon-sysfs.h"
Signed-off-by: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/i2c/chips/pca9539 | 47 |
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 @@ | |||
1 | Kernel driver pca9539 | ||
2 | ===================== | ||
3 | |||
4 | Supported 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 | |||
11 | Author: Ben Gardner <bgardner@wabtec.com> | ||
12 | |||
13 | |||
14 | Description | ||
15 | ----------- | ||
16 | |||
17 | The Philips PCA9539 is a 16 bit low power I/O device. | ||
18 | All 16 lines can be individually configured as an input or output. | ||
19 | The input sense can also be inverted. | ||
20 | The 16 lines are split between two bytes. | ||
21 | |||
22 | |||
23 | Sysfs entries | ||
24 | ------------- | ||
25 | |||
26 | Each is a byte that maps to the 8 I/O bits. | ||
27 | A '0' suffix is for bits 0-7, while '1' is for bits 8-15. | ||
28 | |||
29 | input[01] - read the current value | ||
30 | output[01] - sets the output value | ||
31 | direction[01] - direction of each bit: 1=input, 0=output | ||
32 | invert[01] - toggle the input bit sense | ||
33 | |||
34 | input reads the actual state of the line and is always available. | ||
35 | The direction defaults to input for all channels. | ||
36 | |||
37 | |||
38 | General Remarks | ||
39 | --------------- | ||
40 | |||
41 | Note that each output, direction, and invert entry controls 8 lines. | ||
42 | You should use the read, modify, write sequence. | ||
43 | For example. to set output bit 0 of 1. | ||
44 | val=$(cat output0) | ||
45 | val=$(( $val | 1 )) | ||
46 | echo $val > output0 | ||
47 | |||