linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: Rob Herring <robherring2@gmail.com>,
	delicious quinoa <delicious.quinoa@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	"linux-gpio@vger.kernel.org" <linux-gpio@vger.kernel.org>,
	Linus Walleij <linus.walleij@stericsson.com>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	Grant Likely <grant.likely@secretlab.ca>,
	Rob Herring <rob.herring@calxeda.com>,
	Steffen Trumtrar <s.trumtrar@pengutronix.de>,
	Jamie Iles <jamie@jamieiles.com>,
	Heiko Stuebner <heiko@sntech.de>, Alan Tull <atull@altera.com>,
	Dinh Nguyen <dinguyen@altera.com>,
	Yves Vandervennet <rocket.yvanderv@gmail.com>
Subject: Re: [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block
Date: Thu, 21 Nov 2013 00:46:08 +0100	[thread overview]
Message-ID: <528D49C0.40601@gmail.com> (raw)
In-Reply-To: <CAL_JsqKjrPmExaeDLEt0C2eTv+Uw7kgHfd3URoim2pzTQYeXAg@mail.gmail.com>

On 11/21/2013 12:40 AM, Rob Herring wrote:
> On Wed, Nov 20, 2013 at 3:47 PM, delicious quinoa
> <delicious.quinoa@gmail.com> wrote:
>> On Thu, Nov 7, 2013 at 6:33 AM, Sebastian Hesselbarth
>> <sebastian.hesselbarth@gmail.com> wrote:
>>> On 11/06/13 23:49, Alan Tull wrote:
>
> [snip]
>
>>> BTW, what if we get rid of port child nodes completely and rather
>>> use:
>>>
>>> gpio: gpio-controller@20000 {
>>>          compatible = "snps,dw-apb-gpio";
>>>          reg = <0x20000 0x1000>;
>>>          gpio-controller;
>>>          #gpio-cells = <2>;
>>>          interrupt-controller;
>>>          interrupt-parent = <&vic1>;
>>>          interrupts = <0 1 2 3 4 5 6 7>;
>>>          snps,port-widths = <8 8 0 0>;
>>> };
>>>
>>> The only draw-back compared to child-nodes is, that you'll reference
>>> gpios with <&gpio 13> instead of <&banka 5>. I have no strong opinion
>>> about it, so I leave the correct answer to either LinusW or DT
>>> maintainers.
>>
>> I left this as-is for now.
>
> I generally favor less nodes of things, but I think we discussed this
> when originally posted and keeping them seemed to be the right choice.
> What if you have sparsely populated banks like this:
>
> snps,port-widths = <4 4 0 0>;
> snps,port-widths = <8 0 8 0>;
>
> Also, you would need to define how the interrupts are done. You may
> have 1 per port or 1 per gpio line or a mixture if the h/w folks
> really hate you.

Actually, dw-apb-gpio only allows irqs on portA. Also, we only need to
register all upstream irqs to have our handler called which looks for
the right downstream irq to trigger.

But as I said, I have nothing against sub-nodes - at least it makes
referencing gpio lines of different ports easier.

Sebastian


      reply	other threads:[~2013-11-20 23:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-06 22:49 [PATCH 0/1] gpio: add a driver for the Synopsys DesignWare APB GPIO Alan Tull
2013-11-06 22:49 ` [PATCH 1/1] gpio: add a driver for the Synopsys DesignWare APB GPIO block Alan Tull
2013-11-06 23:09   ` Fabio Estevam
2013-11-06 23:18     ` delicious quinoa
     [not found]       ` <CANk1AXTys8B-jW0bATu19pOauVqe=aMc7v=SxXPm7npWb2y7eA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-06 23:29         ` Sebastian Hesselbarth
2013-11-06 23:34   ` Jamie Iles
2013-11-06 23:44     ` Sebastian Hesselbarth
2013-11-07 21:06       ` delicious quinoa
2013-11-07 12:33   ` Sebastian Hesselbarth
2013-11-20 21:47     ` delicious quinoa
2013-11-20 23:40       ` Rob Herring
2013-11-20 23:46         ` Sebastian Hesselbarth [this message]

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=528D49C0.40601@gmail.com \
    --to=sebastian.hesselbarth@gmail.com \
    --cc=atull@altera.com \
    --cc=delicious.quinoa@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@altera.com \
    --cc=grant.likely@secretlab.ca \
    --cc=heiko@sntech.de \
    --cc=jamie@jamieiles.com \
    --cc=linus.walleij@stericsson.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rob.herring@calxeda.com \
    --cc=robherring2@gmail.com \
    --cc=rocket.yvanderv@gmail.com \
    --cc=s.trumtrar@pengutronix.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 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).