gpiolib: pca9539 i2c gpio expander support

This adds a new-style I2C driver with basic support for the sixteen bit
PCA9539 GPIO expanders.  These chips have multiple registers, push-pull output
drivers, and (not supported in this patch) pin change interrupts.

Board-specific code must provide "pca9539_platform_data" with each chip's
"i2c_board_info".  That provides the GPIO numbers to be used by that chip, and
callbacks for board-specific setup/teardown logic.

Derived from drivers/i2c/chips/pca9539.c (which has no current known users).
This is faster and simpler; it uses 16-bit register access, and cache the
OUTPUT and DIRECTION registers for fast access

Signed-off-by: eric miao <eric.miao@marvell.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Jean Delvare <khali@linux-fr.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Ben Gardner <bgardner@wabtec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Esse commit está contido em:
eric miao
2008-02-04 22:28:26 -08:00
commit de Linus Torvalds
commit 9e60fdcf0c
4 arquivos alterados com 300 adições e 0 exclusões

Ver arquivo

@@ -27,6 +27,16 @@ config DEBUG_GPIO
comment "I2C GPIO expanders:"
config GPIO_PCA9539
tristate "PCA9539 16-bit I/O port"
depends on I2C
help
Say yes here to support the PCA9539 16-bit I/O port. These
parts are made by NXP and TI.
This driver can also be built as a module. If so, the module
will be called pca9539.
config GPIO_PCF857X
tristate "PCF857x, PCA857x, and PCA967x I2C GPIO expanders"
depends on I2C