[<prev] [next>] [day] [month] [year] [list]
Message-ID: <Ztc0a3uSy7HmUWYJ@smile.fi.intel.com>
Date: Tue, 3 Sep 2024 19:08:11 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Ye Zhang <ye.zhang@...k-chips.com>
Cc: linus.walleij@...aro.org, brgl@...ev.pl, 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, tao.huang@...k-chips.com,
finley.xiao@...k-chips.com, tim.chen@...k-chips.com,
elaine.zhang@...k-chips.com
Subject: Re: [PATCH v3 11/12] gpio: rockchip: Set input direction when
request irq
On Tue, Sep 03, 2024 at 03:36:48PM +0800, Ye Zhang 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.
...
> static int rockchip_irq_reqres(struct irq_data *d)
> {
> + irq_hw_number_t hwirq;
> struct irq_chip_generic *gc = irq_data_get_irq_chip_data(d);
> struct rockchip_pin_bank *bank = gc->private;
>
> - return gpiochip_reqres_irq(&bank->gpio_chip, d->hwirq);
> + hwirq = irqd_to_hwirq(d);
> + rockchip_gpio_direction_input(&bank->gpio_chip, hwirq);
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);
rockchip_gpio_direction_input(&bank->gpio_chip, hwirq);
> + return gpiochip_reqres_irq(&bank->gpio_chip, hwirq);
> }
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists