public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur@codeaurora.org>
To: "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: platform_get_irq_byname() supported on ACPI?
Date: Mon, 8 Feb 2016 10:48:33 -0600	[thread overview]
Message-ID: <56B8C6E1.1040804@codeaurora.org> (raw)

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.

             reply	other threads:[~2016-02-08 16:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08 16:48 Timur Tabi [this message]
2016-02-08 22:37 ` platform_get_irq_byname() supported on ACPI? Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56B8C6E1.1040804@codeaurora.org \
    --to=timur@codeaurora.org \
    --cc=linux-acpi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox