From: Arnd Bergmann <arnd@arndb.de>
To: Y Vo <yvo@apm.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>, Phong Vo <pvo@apm.com>,
Toan Le <toanle@apm.com>, Loc Ho <lho@apm.com>,
Feng Kan <fkan@apm.com>, Quan Nguyen <qnguyen@apm.com>,
Duc Dang <dhdang@apm.com>, patches <patches@apm.com>
Subject: Re: [PATCH 2/2] Documentation: gpio: Update description for X-Gene standby GPIO controller DTS binding
Date: Fri, 11 Sep 2015 18:45:34 +0200 [thread overview]
Message-ID: <2311005.jUde56dLfB@wuerfel> (raw)
In-Reply-To: <CAL4ahLeoeT79ct-M-Bd-O08K0Dmysas3HFmTfXUFGtHKJBRzsg@mail.gmail.com>
On Friday 11 September 2015 22:06:58 Y Vo wrote:
> On Fri, Sep 11, 2015 at 9:47 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Friday 11 September 2015 21:23:31 Y Vo wrote:
> >> Is that possible if we change to this approach:
> >> - Keep all GPIO as GPIO mode by default.
> >> - If anyone want to use them as interrupt, they must add the interrupt
> >> node to DT specific-board below:
> >>
> >> Example to configure GPIO_DS11, 12, 13 as external irq:
> >>
> >> &sbgpio {
> >> interrupts = <0x0 0x2b 0x1>, /* GPIO_DS11 */
> >> <0x0 0x2c 0x1>, /* GPIO_DS12 */
> >> <0x0 0x2d 0x1>; /* GPIO_DS13 */
> >
> > That is exactly the same as you have in your patch. You should
> > always list all interrupts that the gpio controller is wired
> > to, whether they are used or not.
> >
> > Ideally, the driver just decides at runtime how to wire that
> > mux, based on how the gpio is configured by the client driver.
> > If the client asks for an interrupt (with gpio_to_irq) and is
> > it is configured as an input, then you connect it to the GIC,
> > otherwise you leave it to be handled by the gpio chip itself.
> > Any reason you can't do that?
> >
> As I just explained, the GPIO Standby doesn't support the interrupt.
> Both interrupts are came from GIC, so if the client asks for an
> interrupt, it will go to the GIC driver (not GPIO Standby driver), so
> that's my trouble. We can not implement the code to configured the
> GPIO standby at GIC driver.
So you are saying we merged a binding that is incapable of describing
the hardware? If that is the case, we may have to go back to
the drawing board and come up with a working binding.
One part that I don't understand yet is how the driver handles
irqs to start with, as it does not register a nested irq domain
or irqchip, so I'm guessing that client drivers cannot actually
use the IRQ functionality. Is that right?
It also seems to me that the binding cannot distinguish between a
line configured as an input and one that is configured as an
interrupt, which are for other gpio chips the same thing, but
not on this one. Could this be rectified by using another bit
of the second gpio cell? The low bit is used for active-high/active-low,
so you could use the second bit for irq/input.
Arnd
next prev parent reply other threads:[~2015-09-11 16:46 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 9:22 [PATCH 0/2] gpio: xgene: add support to configure GPIO line as input, output or external IRQ pin Y Vo
2015-09-11 9:22 ` [PATCH 1/2] " Y Vo
2015-10-02 9:51 ` Linus Walleij
2015-10-02 14:03 ` Y Vo
2015-09-11 9:22 ` [PATCH 2/2] Documentation: gpio: Update description for X-Gene standby GPIO controller DTS binding Y Vo
2015-09-11 9:35 ` Arnd Bergmann
2015-09-11 11:24 ` Y Vo
2015-09-11 12:46 ` Arnd Bergmann
2015-09-11 14:23 ` Y Vo
2015-09-11 14:47 ` Arnd Bergmann
2015-09-11 15:06 ` Y Vo
2015-09-11 16:45 ` Arnd Bergmann [this message]
2015-09-12 5:55 ` Y Vo
2015-09-14 9:11 ` Arnd Bergmann
2015-09-14 9:39 ` Y Vo
2015-09-14 14:47 ` Arnd Bergmann
2015-09-14 15:06 ` Y Vo
2015-09-14 15:18 ` Arnd Bergmann
2015-09-14 15:23 ` Marc Zyngier
2015-09-16 1:48 ` Y Vo
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=2311005.jUde56dLfB@wuerfel \
--to=arnd@arndb.de \
--cc=devicetree@vger.kernel.org \
--cc=dhdang@apm.com \
--cc=fkan@apm.com \
--cc=lho@apm.com \
--cc=linus.walleij@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-gpio@vger.kernel.org \
--cc=patches@apm.com \
--cc=pvo@apm.com \
--cc=qnguyen@apm.com \
--cc=toanle@apm.com \
--cc=yvo@apm.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).