pinctrl: st: add irq_request/release_resources callbacks
authorPatrice Chotard <patrice.chotard@st.com>
Thu, 16 Mar 2017 17:26:02 +0000 (18:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Dec 2017 13:23:39 +0000 (14:23 +0100)
commit0f4aa1f0f576b4a4706eb0f419a23922c45deb31
tree655fc56f50254f34eab63bf02376af67c1c50258
parent7656871eff6ae5957394767a08ee0ce581023ed7
pinctrl: st: add irq_request/release_resources callbacks

[ Upstream commit e855fa9a65c40788b5069abb0d094537daa22e05 ]

When using GPIO as IRQ source, the GPIO must be configured
in INPUT. Callbacks dedicated for this was missing in
pinctrl-st driver.

This fix the following kernel error when trying to lock a gpio
as IRQ:

[    7.521095] gpio gpiochip7: (PIO11): gpiochip_lock_as_irq: tried to flag a GPIO set as output for IRQ
[    7.526018] gpio gpiochip7: (PIO11): unable to lock HW IRQ 6 for IRQ
[    7.529405] genirq: Failed to request resources for 0-0053 (irq 81) on irqchip GPIO

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pinctrl/pinctrl-st.c