* platform_get_irq_byname() supported on ACPI?
@ 2016-02-08 16:48 Timur Tabi
2016-02-08 22:37 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Timur Tabi @ 2016-02-08 16:48 UTC (permalink / raw)
To: linux-acpi@vger.kernel.org
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);
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
Forum, a Linux Foundation Collaborative Project.
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: platform_get_irq_byname() supported on ACPI?
2016-02-08 16:48 platform_get_irq_byname() supported on ACPI? Timur Tabi
@ 2016-02-08 22:37 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2016-02-08 22:37 UTC (permalink / raw)
To: Timur Tabi; +Cc: linux-acpi@vger.kernel.org
On Monday, February 08, 2016 10:48:33 AM Timur Tabi wrote:
> 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.
>
> 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);
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-08 22:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-08 16:48 platform_get_irq_byname() supported on ACPI? Timur Tabi
2016-02-08 22:37 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox