pinctrl: st: Convert to immutable irq_chip
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 4 Apr 2023 09:43:09 +0000 (11:43 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 14 Apr 2023 09:08:17 +0000 (11:08 +0200)
commitc36f8c06ebd0c4feda85b178d927e6e04dbe4c3f
treec26fa1c263d4bcdac36ca1e92761b82048c79042
parentcca973a823f1c94313256ab214af0577dcc3a52b
pinctrl: st: Convert to immutable irq_chip

Convert the driver to immutable irq-chip with a bit of
intuition.

I switched to using irqd_to_hwirq() consistently while we
are at it.

This driver does not use the GPIOCHIP_IRQ_RESOURCE_HELPERS
as it defines its own resource reservations, simply in
order to turn IRQ lines into inputs on initialization.

Also switched the open coded calls to gpiochip_lock_as_irq()
to gpiochip_reqres_irq() so we also get the right module
reference counting.

Cc: Marc Zyngier <maz@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230403-immutable-irqchips-v1-7-503788a7f6e6@linaro.org
drivers/pinctrl/pinctrl-st.c