Lars Poeschel 4e47f91bf7 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>
2014-01-17 15:30:14 +01:00
..
2013-10-29 18:26:14 -07:00
2013-12-12 14:28:12 +01:00
2013-12-09 14:04:37 +01:00
2012-11-28 11:39:59 -08:00
2013-12-04 14:48:17 +01:00
2013-08-16 15:24:35 +02:00
2012-11-28 11:39:33 -08:00
2013-12-09 14:04:37 +01:00
2013-08-16 15:24:35 +02:00
2013-08-16 15:24:35 +02:00
2013-12-09 14:04:37 +01:00
2013-12-09 14:04:37 +01:00
2012-11-28 11:39:59 -08:00
2013-06-17 07:47:33 +02:00
2013-12-12 14:33:14 +01:00
2014-01-08 15:07:28 +01:00
2014-01-08 15:07:28 +01:00