Re: [PATCH v7 16/34] pinctrl: airoha: add missed IRQ resource helpers

Lorenzo Bianconi <[email protected]>
Newsgroups org.infradead.lists.linux-mediatek,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-gpio,org.kernel.vger.linux-kernel
Message-ID <amcYA-tt4BziTjfW@lore-desk>
> Without hooking .irq_request_resources, gpiolib cannot set
> GPIOD_FLAG_USED_AS_IRQ. This breaks pin direction locking and can allow
> userspace or another driver to reconfigure an active IRQ pin as an output
> 
> Fixes: 1c8ace2d0725 ("pinctrl: airoha: Add support for EN7581 SoC")
> Signed-off-by: Mikhail Kshevetskiy <[email protected]>

Acked-by: Lorenzo Bianconi <[email protected]>

> ---
>  drivers/pinctrl/airoha/pinctrl-airoha.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/pinctrl/airoha/pinctrl-airoha.c b/drivers/pinctrl/airoha/pinctrl-airoha.c
> index f85941ccea560..d218a1f01648b 100644
> --- a/drivers/pinctrl/airoha/pinctrl-airoha.c
> +++ b/drivers/pinctrl/airoha/pinctrl-airoha.c
> @@ -2676,6 +2676,7 @@ static const struct irq_chip airoha_gpio_irq_chip = {
>  	.irq_mask_ack = airoha_irq_mask,
>  	.irq_set_type = airoha_irq_type,
>  	.flags = IRQCHIP_SET_TYPE_MASKED | IRQCHIP_IMMUTABLE,
> +	GPIOCHIP_IRQ_RESOURCE_HELPERS,
>  };
>  
>  static int airoha_pinctrl_add_gpiochip(struct airoha_pinctrl *pinctrl,
> -- 
> 2.53.0
>
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQTquNwa3Txd3rGGn7Y6cBh0uS2trAUCamcYAwAKCRA6cBh0uS2t
rPaEAP4p1fD3RPtbM1JEPT32QqUOEtELuFm/RjAredm8P4rzUwEAq7d2OKZgqxWm
k44l5LoEQqxt7PUXpQCB40sgQUkeGw4=
=dlSW
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.