pinctrl: stm32: Do not call stm32_gpio_get() for edge triggered IRQs in EOI
authorMarek Vasut <marex@denx.de>
Fri, 15 Apr 2022 21:54:10 +0000 (23:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 May 2022 07:05:02 +0000 (09:05 +0200)
commit690c1bc4bfcfc26d67402a6d6d308b975b2b4cd4
tree2deac8d2a90d6194607968500c5e3be85780f650
parent6f2bf9c5ddfebdac7d002bc3cdde7fda22d2bf2a
pinctrl: stm32: Do not call stm32_gpio_get() for edge triggered IRQs in EOI

[ Upstream commit e74200ebf7c4f6a7a7d1be9f63833ddba251effa ]

The stm32_gpio_get() should only be called for LEVEL triggered interrupts,
skip calling it for EDGE triggered interrupts altogether to avoid wasting
CPU cycles in EOI handler. On this platform, EDGE triggered interrupts are
the majority and LEVEL triggered interrupts are the exception no less, and
the CPU cycles are not abundant.

Fixes: 47beed513a85b ("pinctrl: stm32: Add level interrupt support to gpio irq chip")
Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Fabien Dessenne <fabien.dessenne@foss.st.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: linux-stm32@st-md-mailman.stormreply.com
Cc: linux-arm-kernel@lists.infradead.org
To: linux-gpio@vger.kernel.org
Link: https://lore.kernel.org/r/20220415215410.498349-1-marex@denx.de
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pinctrl/stm32/pinctrl-stm32.c