[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87edyq1ujr.wl-maz@kernel.org>
Date: Tue, 12 Jul 2022 11:42:32 +0100
From: Marc Zyngier <maz@...nel.org>
To: Robert Marko <robimarko@...il.com>
Cc: bjorn.andersson@...aro.org, agross@...nel.org,
linus.walleij@...aro.org, linux-arm-msm@...r.kernel.org,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pinctrl: qcom: spmi-gpio: make the irqchip immutable
On Fri, 24 Jun 2022 20:51:12 +0100,
Robert Marko <robimarko@...il.com> 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@...0): 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@...il.com>
> ---
> 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,
No, this is wrong. Please look at the documentation to see how you
must now directly call into the gpiolib helpers for these two
callbacks.
Thanks,
M.
--
Without deviation from the norm, progress is not possible.
Powered by blists - more mailing lists