From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: Christophe Ricard <christophe.ricard@gmail.com>
Cc: rjw@rjwysocki.net, Len Brown <lenb@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Alexandre Courbot <gnurou@gmail.com>,
andriy.shevchenko@linux.intel.com, linux-i2c@vger.kernel.org,
linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org,
Christophe Ricard <christophe-h.ricard@st.com>
Subject: Re: [PATCH v3 0/2] ACPI: Add irq_type to gpio interrupt
Date: Tue, 1 Dec 2015 15:03:24 +0200 [thread overview]
Message-ID: <20151201130324.GE1593@lahna.fi.intel.com> (raw)
In-Reply-To: <CALD+uuxJw5tQ2XY99nHigXdNkcXGnng+r9NZ8H9TqUF9GbgW=A@mail.gmail.com>
On Tue, Dec 01, 2015 at 01:25:50PM +0100, Christophe Ricard wrote:
> For example during an i2c_device_probe where an i2c slave device
> describe in devicetree has an interrupts property.
> i2c_device_probe (drivers/i2c/i2c-core.c), retrieves irq property from
> of_irq_get which will looks for an "interrupts" property in
> of_irq_parse_of (drivers/of/irq.c).
> of_irq_get will then call irq_create_mapping (kernel/irq/irqdomain.c)
> which will set the irq_type retrieved during the interrupts node
> parsing.
Found it now thanks.
> This will allow from an i2c slave drivers to configure an interrupt
> handler matching the exact devicetree data for the interrupts property
> of the i2c slave node.
Makes sense.
> Now for the same kind of i2c driver using acpi description, the GpioInt
> polarity/type is at the moment never kept in the irq property.
> It is possible to check that following about the same path...
> i2c_device_probe (drivers/i2c/i2c-core.c), retrieves irq property from
> acpi_dev_gpio_irq_get but does not save the irq_type.
> This would allow not to have to use an additional gpio field and all
> the configuration step to configure the gpio interrupt correctly in a
> device driver and taking a real benefit of the GpioInt acpi keyword
> compare to GpioIo keyword.
> Most the of the drivers based on acpi description retrieve gpio number
> to assign an interrupt and a fix polarity. I believe my patchset
> proposal would improve this and allow to
> be much closer with devicetree.
> Do you see any issue with this ?
No, but I wonder if it would be better to do this in acpi_dev_gpio_irq_get()
instead of acpi_find_gpio() which gets called everytime a GPIO is looked up?
next prev parent reply other threads:[~2015-12-01 13:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-30 22:47 [PATCH v3 0/2] ACPI: Add irq_type to gpio interrupt Christophe Ricard
2015-11-30 22:47 ` [PATCH v3 1/2] acpi: Rename acpi_gsi_get_irq_type to acpi_get_irq_type and export symbol Christophe Ricard
2015-11-30 22:47 ` [PATCH v3 2/2] ACPI / gpio: Add irq_type when a gpio is used as an interrupt Christophe Ricard
2015-12-10 17:00 ` Linus Walleij
2015-12-01 1:03 ` [PATCH v3 0/2] ACPI: Add irq_type to gpio interrupt Wolfram Sang
2015-12-01 7:03 ` Christophe Ricard
2015-12-01 11:21 ` Mika Westerberg
[not found] ` <CALD+uuxJw5tQ2XY99nHigXdNkcXGnng+r9NZ8H9TqUF9GbgW=A@mail.gmail.com>
2015-12-01 13:03 ` Mika Westerberg [this message]
2015-12-04 23:36 ` Christophe Ricard
2015-12-07 10:52 ` Mika Westerberg
2015-12-07 10:53 ` Christophe Henri RICARD
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=20151201130324.GE1593@lahna.fi.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=christophe-h.ricard@st.com \
--cc=christophe.ricard@gmail.com \
--cc=gnurou@gmail.com \
--cc=lenb@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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;
as well as URLs for NNTP newsgroup(s).