diff options
author | Lars Poeschel <poeschel@lemonage.de> | 2014-01-16 11:44:15 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-01-17 15:30:14 +0100 |
commit | 4e47f91bf741e011a90ceb6241b8d78141709733 (patch) | |
tree | 1febf3cbbf59a1202dc5d944d392ce28b6b851fe /drivers/gpio/Kconfig | |
parent | 785acec3eecf4c21bab9e24afb5d354b57a72e03 (diff) |
gpio: mcp23s08: Add irq functionality for i2c chips
This adds interrupt functionality for i2c chips to the driver.
They can act as a interrupt-controller and generate interrupts, if
the inputs change.
This is tested with a mcp23017 chip on an arm based platform.
v3:
- be a bit more clear that the irq functionality is also available
on spi versions of the chips, but the linux driver does not support
this yet
v2:
- some more word about irq-mirror property in binding doc
- use of_read_bool instead of of_find_property for
"interrupt-contrller" and "irq-mirror"
- cache the "interrupt-controller" for remove function
- do set the irq-mirror bit only if device is marked as
interrupt-controller
- do create the irq mapping and setup of irq_desc of all possible
interrupts in probe path instead of in gpio_to_irq
- mark gpios as in use as interrupts in irq in irq_startup and
unlock it in irq_shutdown
- rename virq to child_irq
- remove dev argument from mcp23s08_irq_setup function
- move gpiochip_add before mcp23s08_irq_setup in probe path
Signed-off-by: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/Kconfig')
-rw-r--r-- | drivers/gpio/Kconfig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig index 858d489f6ba..2d49784109b 100644 --- a/drivers/gpio/Kconfig +++ b/drivers/gpio/Kconfig @@ -722,6 +722,7 @@ config GPIO_MCP23S08 SPI/I2C driver for Microchip MCP23S08/MCP23S17/MCP23008/MCP23017 I/O expanders. This provides a GPIO interface supporting inputs and outputs. + The I2C versions of the chips can be used as interrupt-controller. config GPIO_MC33880 tristate "Freescale MC33880 high-side/low-side switch" |