gpio: pcf857x: enable gpio_to_irq() support

pcf857x chip has some pins, but interrupt pin is only 1 pin.
And gpiolib requests 1 interrupt per 1 gpio pin.

Thus, this patch added demuxed irq to pcf857x driver,
and enabled gpio_to_irq().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
Kuninori Morimoto 2012-06-14 19:40:41 -07:00 committed by Linus Walleij
parent 7cb6580c0b
commit 6e20a0a429
2 changed files with 125 additions and 0 deletions

View file

@ -10,6 +10,7 @@
* @setup: optional callback issued once the GPIOs are valid
* @teardown: optional callback issued before the GPIOs are invalidated
* @context: optional parameter passed to setup() and teardown()
* @irq: optional interrupt number
*
* In addition to the I2C_BOARD_INFO() state appropriate to each chip,
* the i2c_board_info used with the pcf875x driver must provide its
@ -39,6 +40,8 @@ struct pcf857x_platform_data {
int gpio, unsigned ngpio,
void *context);
void *context;
int irq;
};
#endif /* __LINUX_PCF857X_H */