[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMRc=MfTmpLSEUVTXSu8jf9tyTfQc=iG9NpovFem-qSDOCnagQ@mail.gmail.com>
Date: Tue, 12 Nov 2024 09:48:06 +0100
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Ye Zhang <ye.zhang@...k-chips.com>
Cc: linus.walleij@...aro.org, heiko@...ech.de, linux-gpio@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-rockchip@...ts.infradead.org,
linux-kernel@...r.kernel.org, mika.westerberg@...ux.intel.com,
andriy.shevchenko@...ux.intel.com, tao.huang@...k-chips.com,
finley.xiao@...k-chips.com, tim.chen@...k-chips.com,
elaine.zhang@...k-chips.com,
Sebastian Reichel <sebastian.reichel@...labora.com>
Subject: Re: [PATCH v5 4/4] gpio: rockchip: Set input direction when request irq
On Tue, Nov 12, 2024 at 2:54 AM Ye Zhang <ye.zhang@...k-chips.com> wrote:
>
> Since the GPIO can only generate interrupts when its direction is set to
> input, it is set to input before requesting the interrupt resources.
>
> Signed-off-by: Ye Zhang <ye.zhang@...k-chips.com>
> Reviewed-by: Sebastian Reichel <sebastian.reichel@...labora.com>
> ---
> drivers/gpio/gpio-rockchip.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c
> index c090cac694bf..cdfdd5501a1e 100644
> --- a/drivers/gpio/gpio-rockchip.c
> +++ b/drivers/gpio/gpio-rockchip.c
> @@ -476,8 +476,11 @@ static int rockchip_irq_reqres(struct irq_data *d)
> {
> struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
> struct rockchip_pin_bank *bank = gc->private;
> + irq_hw_number_t hwirq = irqd_to_hwirq(d);
>
> - return gpiochip_reqres_irq(&bank->gpio_chip, d->hwirq);
> + rockchip_gpio_direction_input(&bank->gpio_chip, hwirq);
> +
> + return gpiochip_reqres_irq(&bank->gpio_chip, hwirq);
> }
>
> static void rockchip_irq_relres(struct irq_data *d)
> --
> 2.34.1
>
This looks like a fix to me, do you want it sent for stable? If so,
please add the Fixes tag and put it first in the series.
Bart
Powered by blists - more mailing lists