Re: [PATCH v2 1/2] device property: Add fwnode_irq_get_byname()
From: Andy Shevchenko
Date: Wed Nov 10 2021 - 12:27:25 EST
On Wed, Nov 10, 2021 at 10:34:43PM +0530, Puranjay Mohan wrote:
> On Wed, Nov 10, 2021 at 2:23 PM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> > On Wed, Nov 10, 2021 at 01:38:39AM +0530, Puranjay Mohan wrote:
> I wrote this function keeping the device tree in mind. I will have to
> look into ACPI and see how the cases you mentioned can be implemented.
> Let's see how far I can get with understanding the ACPI.
Yeah.
What you need to have is
1) expand fwnode_irq_get() to support ACPI GPIO IRQ resources.
2) provide a simple version of the fwnode_irq_get_by_name() like
if (is_of_node())
return of_...();
return acpi_dev_gpio_irq_get_by();
3) establish understanding about naming for ACPI and
4) extend fwnode_irq_get_by_name() by it
if (is_of_node())
return of_...();
ret = acpi_irq_get_by_name();
if (ret > 0)
return ret;
return acpi_dev_gpio_irq_get_by();
As I mentioned, items 1 and 2 are easy to achieve with currently existing APIs.
--
With Best Regards,
Andy Shevchenko