From: Lars Poeschel <poeschel@lemonage.de>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Tomasz Figa <tomasz.figa@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
Lars Poeschel <larsi@wh2.tu-dresden.de>,
Grant Likely <grant.likely@linaro.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Javier Martinez Canillas <javier.martinez@collabora.co.uk>,
Enric Balletbo i Serra <eballetbo@gmail.com>,
Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>,
Santosh Shilimkar <santosh.shilimkar@ti.com>,
Kevin Hilman <khilman@linaro.org>, Balaji T K <balajitk@ti.com>,
Tony Lindgren <tony@atomide.com>,
Jon Hunter <jgchunter@gmail.com>,
mark.rutland@arm.com, ian.campbell@citrix.com,
galak@codeaurora.org, pawel.moll@arm.com
Subject: Re: [PATCH v2] RFC: interrupt consistency check for OF GPIO IRQs
Date: Wed, 21 Aug 2013 15:21:21 +0200 [thread overview]
Message-ID: <201308211521.21129.poeschel@lemonage.de> (raw)
In-Reply-To: <5212737A.1030904@wwwdotorg.org>
On Monday 19 August 2013 at 21:35:22, Stephen Warren wrote:
> On 08/17/2013 03:59 AM, Tomasz Figa wrote:
> > [Ccing DT maintainers, as they may have some ideas as well]
> >
> > On Saturday 17 of August 2013 02:16:11 Linus Walleij wrote:
> >> On Thu, Aug 15, 2013 at 11:53 AM, Tomasz Figa <tomasz.figa@gmail.com>
wrote:
> ...
>
> >>> This is the biggest problem of this patch. It assumes that there is
> >>> only a single and shared GPIO/interrupt specification scheme, which
> >>> might not be true.
> >>>
> >>> First of all, almost all interrupt bindings have an extra,
> >>> semi-generic
> >>> flags field as last cell in the specifier. Now there can be more
> >>> than one>
> >>>
> >>> cell used to index GPIOs and interrupts, for example:
> >>> interrupts = <1 3 8>
> >>>
> >>> which could mean: bank 1, pin 3, low level triggered.
> >>
> >> You are right, but:
> >> Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
> >> Specifies how to handle the one-celled and two-celled versions.
> >>
> >> And nothing else is specified. So it's not overly complex.
> >
> > The documentation states that:
> > It is the responsibility of the interrupt controller's binding to
> > define the length and format of the interrupt specifier.
> >
> > Then two _example_ formats follow, preceded by following statement:
> > The following two variants are commonly used:
> > I already know a variant which uses three (Exynos combiner) and four
> > (S3C24xx interrupt controller) cells. They are not pin controllers,
> > but you can't stop anyone from adopting similar or even more complex
> > specifiers formats for their hardware, especially when it matches
> > more closely the interrupt/pin layout used in their hardware.
>
> Yes, the binding doc interrupts.txt mentioned above does not specify
> *the* one-/two-cell format, but *a* common/possible one- and two-cell
> format. There's no strict reason that all interrupt controllers have to
> use those exact formats. The only way to parse interrupt specifiers is
> to ask the driver for the the interrupt controller code to parse the
> property.
I agree with you. I also understand the interrupts.txt binding doc as it
lists only a common/possible cell format, but it's purpose is not to
restrict it to this.
I send an updated patch, that uses the drivers xlate function to parse the
interrupt property in a few minutes.
Thanks for clarifying this,
Lars
next prev parent reply other threads:[~2013-08-21 13:21 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-13 9:46 [PATCH v2] RFC: interrupt consistency check for OF GPIO IRQs Lars Poeschel
2013-08-13 15:22 ` Kevin Hilman
2013-08-15 9:53 ` Tomasz Figa
2013-08-15 12:12 ` Lars Poeschel
2013-08-15 12:31 ` Tomasz Figa
2013-08-17 0:26 ` Linus Walleij
2013-08-17 0:16 ` Linus Walleij
2013-08-17 9:59 ` Tomasz Figa
2013-08-19 19:35 ` Stephen Warren
2013-08-21 13:21 ` Lars Poeschel [this message]
2013-08-21 23:00 ` Linus Walleij
2013-08-17 0:02 ` Linus Walleij
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=201308211521.21129.poeschel@lemonage.de \
--to=poeschel@lemonage.de \
--cc=balajitk@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=eballetbo@gmail.com \
--cc=galak@codeaurora.org \
--cc=grant.likely@linaro.org \
--cc=ian.campbell@citrix.com \
--cc=javier.martinez@collabora.co.uk \
--cc=jgchunter@gmail.com \
--cc=khilman@linaro.org \
--cc=larsi@wh2.tu-dresden.de \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=pawel.moll@arm.com \
--cc=plagnioj@jcrosoft.com \
--cc=santosh.shilimkar@ti.com \
--cc=swarren@wwwdotorg.org \
--cc=tomasz.figa@gmail.com \
--cc=tony@atomide.com \
/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).