]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pinctrl: baytrail: Clear interrupt triggering from pins that are in GPIO mode
authorMika Westerberg <mika.westerberg@linux.intel.com>
Mon, 23 Feb 2015 12:53:11 +0000 (14:53 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 28 Apr 2020 18:02:40 +0000 (19:02 +0100)
commitac52ab18dc9548e3273c36c078d9cc2e6646740f
tree8895e1d063072fc9915d213587b0146ffd7192fe
parentd2a0a4a92eb80a23cc6a8188c7114c136c5e5994
pinctrl: baytrail: Clear interrupt triggering from pins that are in GPIO mode

commit 95f0972c7e4cbf3fc68160131c5ac2f033481d00 upstream.

If the pin is already configured as GPIO and it has any of the triggering
flags set, we may get spurious interrupts depending on the state of the
pin.

Prevent this by clearing the triggering flags on such pins. However, if the
pin is also configured as "direct IRQ" we leave the flags as is. Otherwise
it will prevent interrupts that are routed directly to IO-APIC.

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
[bwh: Backported to 3.16:
 - Add definition of BYT_DIRECT_IRQ_EN
 - Adjust filename]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/pinctrl/pinctrl-baytrail.c