All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: "Jonathan Neuschäfer" <j.neuschaefer@gmx.net>
Cc: linux-gpio@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	openbmc@lists.ozlabs.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pinctrl: nuvoton: wpcm450: Convert irqchip to IRQCHIP_IMMUTABLE
Date: Tue, 07 Jun 2022 08:29:05 +0100	[thread overview]
Message-ID: <87r141ylry.wl-maz@kernel.org> (raw)
In-Reply-To: <20220606214301.2061467-1-j.neuschaefer@gmx.net>

On Mon, 06 Jun 2022 22:43:00 +0100,
Jonathan Neuschäfer <j.neuschaefer@gmx.net> wrote:
> 
> Commit 6c846d026d490 ("gpio: Don't fiddle with irqchips marked as
> immutable") added a warning for irqchips that are not marked with
> IRQCHIP_IMMUTABLE.
> 
> Convert the pinctrl-wpcm450 driver to an immutable irqchip.
> 
> Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
> ---
>  drivers/pinctrl/nuvoton/pinctrl-wpcm450.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c b/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c
> index 0dbeb91f0bf27..cff784a7ce4d7 100644
> --- a/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c
> +++ b/drivers/pinctrl/nuvoton/pinctrl-wpcm450.c
> @@ -293,6 +293,8 @@ static const struct irq_chip wpcm450_gpio_irqchip = {
>  	.irq_unmask = wpcm450_gpio_irq_unmask,
>  	.irq_mask = wpcm450_gpio_irq_mask,
>  	.irq_set_type = wpcm450_gpio_set_irq_type,
> +	.flags = IRQCHIP_IMMUTABLE,
> +	GPIOCHIP_IRQ_RESOURCE_HELPERS,
>  };
> 
>  static void wpcm450_gpio_irqhandler(struct irq_desc *desc)
> @@ -1068,9 +1070,8 @@ static int wpcm450_gpio_register(struct platform_device *pdev,
>  		gpio->gc.fwnode = child;
>  		gpio->gc.add_pin_ranges = wpcm450_gpio_add_pin_ranges;
> 
> -		gpio->irqc = wpcm450_gpio_irqchip;
>  		girq = &gpio->gc.irq;
> -		girq->chip = &gpio->irqc;
> +		gpio_irq_chip_set_chip(girq, &wpcm450_gpio_irqchip);
>  		girq->parent_handler = wpcm450_gpio_irqhandler;
>  		girq->parents = devm_kcalloc(dev, WPCM450_NUM_GPIO_IRQS,
>  					     sizeof(*girq->parents), GFP_KERNEL);

You are definitely missing the required updates to the mask/unmask
methods, and you still have a now useless irq_chip structure in
wpcm450_gpio.

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2022-06-07  7:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-06 21:43 [PATCH] pinctrl: nuvoton: wpcm450: Convert irqchip to IRQCHIP_IMMUTABLE Jonathan Neuschäfer
2022-06-06 21:43 ` Jonathan Neuschäfer
2022-06-07  7:29 ` Marc Zyngier [this message]
2022-06-07  8:43   ` Jonathan Neuschäfer
2022-06-07  8:43     ` Jonathan Neuschäfer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r141ylry.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=j.neuschaefer@gmx.net \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.