Skip to content
Commit 84e7a946 authored by Paul Cercueil's avatar Paul Cercueil Committed by Linus Walleij
Browse files

pinctrl: ingenic: Properly detect GPIO direction when configured for IRQ



The PAT1 register contains information about the IRQ type (edge/level)
for input GPIOs with IRQ enabled, and the direction for non-IRQ GPIOs.
So it makes sense to read it only if the GPIO has no interrupt
configured, otherwise input GPIOs configured for level IRQs are
misdetected as output GPIOs.

Fixes: ebd66514 ("pinctrl: ingenic: Implement .get_direction for GPIO chips")
Reported-by: default avatarJoão Henrique <johnnyonflame@hotmail.com>
Signed-off-by: default avatarPaul Cercueil <paul@crapouillou.net>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200622214548.265417-2-paul@crapouillou.net


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 1c95348b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment