platform_get_irq_byname() supported on ACPI?
Is there support for the platform_get_irq_byname() function on ACPI systems?
I'm working on adding ACPI support for a driver that currently only supports device tree. This driver has code like this:
ret = platform_get_irq_byname(pdev, "core0_irq");
This function works fine on device tree, but it fails on our ACPI system because our ACPI nodes don't appear to have any way to attach a name to an IRQ resource:
Method (_CRS, 0x0, Serialized) {
Name (RBUF, ResourceTemplate() {
[snip]
Interrupt (ResourceConsumer, Level, ActiveHigh,
Exclusive, , , )
{0x120, 0x121, 0x122, 0x123}
})
Return (RBUF)
}I would hate to have to do something like this:
ret = platform_get_irq_byname(pdev, "core0_irq");
if (ret)
/* ACPI doesn't support named resources */ ret = platform_get_irq(pdev, 0);
Signature · 2 lines
Qualcomm Innovation Center, Inc. The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
Quoted 10 lines · Timur Tabi
Is there support for the
platform_get_irq_byname()function on ACPI systems?I'm working on adding ACPI support for a driver that currently only supports device tree. This driver has code like this:
ret = platform_get_irq_byname(pdev, "core0_irq");This function works fine on device tree, but it fails on our ACPI system because our ACPI nodes don't appear to have any way to attach a name to an IRQ resource:
That's correct.
Quoted 11 lines
Method (_CRS, 0x0, Serialized) {
Name (RBUF, ResourceTemplate() {
[snip]
Interrupt (ResourceConsumer, Level, ActiveHigh,
Exclusive, , , )
{0x120, 0x121, 0x122, 0x123}
})
Return (RBUF)
}Quoted 6 lines
I would hate to have to do something like this:
ret =
platform_get_irq_byname(pdev, "core0_irq");
if (ret)/* ACPI doesn't support named resources */ ret = platform_get_irq(pdev, 0);
That's the only way ATM, though.
In theory _DSD might be used to provide a name for the IRQ resource, but that hasn't been explored yet (and there's no support in the code, of course).
Thanks,
Rafael