]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: omap: fix omap_gpio_free to not clean up irq configuration
authorGrygorii Strashko <grygorii.strashko@linaro.org>
Fri, 22 May 2015 14:35:48 +0000 (17:35 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 1 Jun 2015 14:50:49 +0000 (16:50 +0200)
commit1ebd1c770b37b228a226a4aa16752adeba0bf105
tree9ffcf281eb62abca34c470243cc89f9482e13aa4
parent47300d8224dafbfbd6d49c7679c7976228fb43b9
gpio: omap: fix omap_gpio_free to not clean up irq configuration

This patch fixes following issue:
- GPIOn is used as IRQ by some dev, for example PCF8575.INT ->  gpio6.11
- PCFx driver knows nothing about type of IRQ line (GPIO or not)
  so it doesn't request gpio and just do request_irq()
- If gpio6.11 will be exported through the sysfs and then un-xeported
then IRQs from PCFx will not be received any more, because
IRQ configuration for gpio6.11 will be cleaned up unconditionally
in omap_gpio_free.

Fix this by removing all GPIO IRQ specific code from omap_gpio_free()
and also do GPIO clean up (change direction to 'in' and disable debounce)
only if corresponding GPIO is not used as IRQ too.
GPIO IRQ will be properly cleaned up by GPIO irqchip code.

Signed-off-by: Grygorii Strashko <grygorii.strashko@linaro.org>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-omap.c