diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2011-07-15 08:25:32 (GMT) |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-07-15 19:54:18 (GMT) |
commit | 752ad5e82dfd83851e44a2b9da8761994cd7e61c (patch) | |
tree | de338b98720ac3a37f18b2db868a85e2b8cfe726 /drivers/gpio/Kconfig | |
parent | d62b98f305a6b0d32fbdc72ac6ba3d4f4768adeb (diff) | |
download | linux-752ad5e82dfd83851e44a2b9da8761994cd7e61c.tar.xz |
mcp23s08: add i2c support
Add i2c bindings for the mcp230xx devices. This is quite a lot simpler
than the spi one as there's no funky sub addressing done (one struct
i2c_client per struct gpio_chip).
The mcp23s08_platform_data structure is reused for i2c, even though
only a single mcp23s08_chip_info structure is needed.
To use, simply fill out a platform_data structure and pass it in
i2c_board_info, E.G.:
static const struct mcp23s08_platform_data mcp23017_data = {
.chip[0] = {
.pullups = 0x00ff,
},
.base = 240,
};
static struct i2c_board_info __initdata i2c_devs[] = {
{ I2C_BOARD_INFO("mcp23017", 0x20),
.platform_data = &smartview_mcp23017_data, },
...
};
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/gpio/Kconfig')
-rw-r--r-- | drivers/gpio/Kconfig | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 47eae6e..3634986 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -412,10 +412,11 @@ config GPIO_MAX7301 GPIO driver for Maxim MAX7301 SPI-based GPIO expander. config GPIO_MCP23S08 - tristate "Microchip MCP23Sxx I/O expander" - depends on SPI_MASTER + tristate "Microchip MCP23xxx I/O expander" + depends on SPI_MASTER || I2C help - SPI driver for Microchip MCP23S08/MPC23S17 I/O expanders. + SPI/I2C driver for Microchip MCP23S08/MCP23S17/MCP23008/MCP23017 + I/O expanders. This provides a GPIO interface supporting inputs and outputs. config GPIO_MC33880 |