[PATCH v2] gpio: rockchip: Set input direction when request irq

Andy Shevchenko andriy.shevchenko at linux.intel.com
Fri Aug 23 07:59:01 PDT 2024


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





More information about the Linux-rockchip mailing list