From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Linus Walleij <linus.walleij@linaro.org>,
Alexandre Courbot <gnurou@gmail.com>,
Wolfram Sang <wsa@the-dreams.de>,
Octavian Purdila <octavian.purdila@intel.com>,
Robert Dolca <robert.dolca@intel.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-acpi@vger.kernel.org
Subject: Re: [PATCH 1/2] gpio / ACPI: Add support for retrieving GpioInt resources from a device
Date: Tue, 5 May 2015 15:29:54 +0300 [thread overview]
Message-ID: <20150505122954.GD1541@lahna.fi.intel.com> (raw)
In-Reply-To: <1988723.gb0XCG22Xj@vostro.rjw.lan>
On Tue, May 05, 2015 at 01:47:36AM +0200, Rafael J. Wysocki wrote:
> On Tuesday, April 28, 2015 06:05:06 PM Mika Westerberg wrote:
> > ACPI specification knows two types of GPIOs: GpioIo and GpioInt. The latter
> > is used to describe that a given device interrupt line is connected to a
> > specific GPIO pin. Typical ACPI _CRS entry for such device looks like
> > below:
> >
> > Name (_CRS, ResourceTemplate ()
> > {
> > I2cSerialBus (0x004A, ControllerInitiated, 0x00061A80,
> > AddressingMode7Bit, "\\_SB.PCI0.I2C6",
> > 0x00, ResourceConsumer)
> > GpioIo (Exclusive, PullDefault, 0x0000, 0x0000,
> > IoRestrictionOutputOnly, "\\_SB.GPO0",
> > 0x00, ResourceConsumer)
> > {
> > 0x004B
> > }
> > GpioInt (Level, ActiveLow, Shared, PullDefault, 0x0000,
> > "\\_SB.GPO0", 0x00, ResourceConsumer)
> > {
> > 0x004C
> > }
> > })
> >
> > Currently drivers need to request a GPIO corresponding to the right GpioInt
> > and then translate that to Linux IRQ number. This adds unnecessary lines of
> > boiler-plate code.
> >
> > We can ease this a bit by introducing acpi_dev_gpio_irq_get() analogous to
> > of_irq_get(). This function translates given GpioInt resource under the
> > device in question to the suitable Linux IRQ number.
> >
> > Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
>
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Thanks Rafael.
I'm going to change the other patch a bit to address conserns from
Wolfram so that we will use irq == 0 to indicate an invalid interrupt
instead of -1.
next prev parent reply other threads:[~2015-05-05 12:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-28 15:05 [PATCH 0/2] ACPI: Translate Linux IRQ number directly from GpioInt Mika Westerberg
2015-04-28 15:05 ` [PATCH 1/2] gpio / ACPI: Add support for retrieving GpioInt resources from a device Mika Westerberg
2015-05-04 23:47 ` Rafael J. Wysocki
2015-05-05 12:29 ` Mika Westerberg [this message]
2015-04-28 15:05 ` [PATCH 2/2] i2c / ACPI: Assign IRQ for devices that have GpioInt automatically Mika Westerberg
2015-04-29 9:56 ` Wolfram Sang
2015-04-29 10:02 ` Mika Westerberg
2015-04-28 17:36 ` [PATCH 0/2] ACPI: Translate Linux IRQ number directly from GpioInt sathyanarayanan kuppuswamy
2015-04-29 9:26 ` Mika Westerberg
2015-04-29 17:45 ` sathyanarayanan kuppuswamy
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=20150505122954.GD1541@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=octavian.purdila@intel.com \
--cc=rjw@rjwysocki.net \
--cc=robert.dolca@intel.com \
--cc=wsa@the-dreams.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.