From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Robert Marko <robimarko@gmail.com>
Cc: bjorn.andersson@linaro.org, agross@kernel.org,
linus.walleij@linaro.org, linux-arm-msm@vger.kernel.org,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pinctrl: qcom: spmi-gpio: make the irqchip immutable
Date: Wed, 6 Jul 2022 19:30:31 +0530 [thread overview]
Message-ID: <20220706140031.GB2327@thinkpad> (raw)
In-Reply-To: <20220624195112.894916-1-robimarko@gmail.com>
On Fri, Jun 24, 2022 at 09:51:12PM +0200, Robert Marko wrote:
> Commit 6c846d026d49 ("gpio: Don't fiddle with irqchips marked as
> immutable") added a warning to indicate if the gpiolib is altering the
> internals of irqchips.
>
> Following this change the following warning is now observed for the SPMI
> PMIC pinctrl driver:
> gpio gpiochip1: (200f000.spmi:pmic@0:gpio@c000): not an immutable chip, please consider fixing it!
>
> Fix this by making the irqchip in the SPMI PMIC pinctrl driver immutable.
>
> Signed-off-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
I've also tested this patch on Lenovo X13s, so
Tested-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Thanks,
Mani
> ---
> drivers/pinctrl/qcom/pinctrl-spmi-gpio.c | 22 ++++++++++++----------
> 1 file changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> index c3255b0bece4..406ee0933d0b 100644
> --- a/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> +++ b/drivers/pinctrl/qcom/pinctrl-spmi-gpio.c
> @@ -171,7 +171,6 @@ struct pmic_gpio_state {
> struct regmap *map;
> struct pinctrl_dev *ctrl;
> struct gpio_chip chip;
> - struct irq_chip irq;
> u8 usid;
> u8 pid_base;
> };
> @@ -988,6 +987,17 @@ static void *pmic_gpio_populate_parent_fwspec(struct gpio_chip *chip,
> return fwspec;
> }
>
> +static const struct irq_chip spmi_gpio_irq_chip = {
> + .name = "spmi-gpio",
> + .irq_ack = irq_chip_ack_parent,
> + .irq_mask = irq_chip_mask_parent,
> + .irq_unmask = irq_chip_unmask_parent,
> + .irq_set_type = irq_chip_set_type_parent,
> + .irq_set_wake = irq_chip_set_wake_parent,
> + .flags = IRQCHIP_IMMUTABLE | IRQCHIP_MASK_ON_SUSPEND,
> + GPIOCHIP_IRQ_RESOURCE_HELPERS,
> +};
> +
> static int pmic_gpio_probe(struct platform_device *pdev)
> {
> struct irq_domain *parent_domain;
> @@ -1081,16 +1091,8 @@ static int pmic_gpio_probe(struct platform_device *pdev)
> if (!parent_domain)
> return -ENXIO;
>
> - state->irq.name = "spmi-gpio",
> - state->irq.irq_ack = irq_chip_ack_parent,
> - state->irq.irq_mask = irq_chip_mask_parent,
> - state->irq.irq_unmask = irq_chip_unmask_parent,
> - state->irq.irq_set_type = irq_chip_set_type_parent,
> - state->irq.irq_set_wake = irq_chip_set_wake_parent,
> - state->irq.flags = IRQCHIP_MASK_ON_SUSPEND,
> -
> girq = &state->chip.irq;
> - girq->chip = &state->irq;
> + gpio_irq_chip_set_chip(girq, &spmi_gpio_irq_chip);
> girq->default_type = IRQ_TYPE_NONE;
> girq->handler = handle_level_irq;
> girq->fwnode = of_node_to_fwnode(state->dev->of_node);
> --
> 2.36.1
>
--
மணிவண்ணன் சதாசிவம்
next prev parent reply other threads:[~2022-07-06 14:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-24 19:51 [PATCH] pinctrl: qcom: spmi-gpio: make the irqchip immutable Robert Marko
2022-07-06 14:00 ` Manivannan Sadhasivam [this message]
2022-07-09 23:05 ` Linus Walleij
2022-07-18 9:59 ` Linus Walleij
2022-07-18 11:20 ` Robert Marko
2022-07-12 10:42 ` Marc Zyngier
2022-07-12 12:44 ` Manivannan Sadhasivam
2022-07-12 15:12 ` Marc Zyngier
2022-07-13 11:08 ` Robert Marko
2022-07-13 11:47 ` Marc Zyngier
2022-07-13 12:33 ` Robert Marko
2022-07-13 13:10 ` Marc Zyngier
2022-07-13 13:34 ` Robert Marko
2022-07-13 13:41 ` Marc Zyngier
2022-07-19 7:47 ` Manivannan Sadhasivam
2022-08-16 12:45 ` Robert Marko
2022-08-19 6:34 ` Manivannan Sadhasivam
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=20220706140031.GB2327@thinkpad \
--to=manivannan.sadhasivam@linaro.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robimarko@gmail.com \
/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.