Re: [PATCH v2] gpio: rockchip: Set input direction when request irq
From: Andy Shevchenko
Date: Fri Aug 23 2024 - 10:59:17 EST
On Fri, Aug 23, 2024 at 11:43:12AM +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.
...
> + rockchip_gpio_direction_input(&bank->gpio_chip, d->hwirq);
> +
> return gpiochip_reqres_irq(&bank->gpio_chip, d->hwirq);
In both cases you want to use irq_hw_number_t and irqd_to_hwirq() at the top of
the function(s).
--
With Best Regards,
Andy Shevchenko