From: Ben Gamari <bgamari.foss@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>,
Mark Rutland <mark.rutland@arm.com>,
jiri.prchal@aksignal.cz
Cc: linux-gpio@vger.kernel.org
Subject: Re: [PATCH v3] gpio: add export with name from dts
Date: Wed, 13 Nov 2013 10:20:18 -0500 [thread overview]
Message-ID: <871u2k49cd.fsf@gmail.com> (raw)
In-Reply-To: <CACRpkdbG9emZg-6oOO8MgwUgCkqQB6+QqYuNAOo-QN0e+wYq2g@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1151 bytes --]
Linus Walleij wrote,
> I think what Mark is saying is that you should not define a new node
> for exports, but instead use the node for the gpiochip and extend
> those existing gpiochip bindings, if you want to do this.
>
What might this look like? Should each exported pin have a node under
the gpio-controller? If we want to allow for pins to be exported to
userspace, a name alone is not sufficient; we also need to provide the
allowed directions. I think this precludes the use of a plain /aliases
node.
Perhaps something like this (please excuse my ignorance of devicetree
norms)?
gpio1: gpio-controller@1400 {
#gpio-cells = <2>;
compatible = "fsl,qe-pario-bank-a", "fsl,qe-pario-bank";
reg = <0x1400 0x18>;
gpio-controller;
pin_a: gpio {
gpio-name = "pin-a";
gpio = <&gpio1 2 0>;
output;
init-high;
};
};
One issue with this is the redundancy of specifying both the
gpio-controller in the `gpio` attribute and by virtue of it being a
child of the controller. Other suggestions?
Cheers,
- Ben
[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]
next prev parent reply other threads:[~2013-11-13 15:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-17 12:08 [PATCH v3] gpio: add export with name from dts Jiri Prchal
2013-10-17 15:04 ` Mark Rutland
2013-10-17 18:03 ` Alexandre Courbot
2013-10-18 7:04 ` Jiří Prchal
2013-10-18 10:36 ` Mark Rutland
2013-10-18 12:49 ` Jiří Prchal
2013-10-18 19:52 ` Linus Walleij
2013-11-13 15:20 ` Ben Gamari [this message]
2013-11-18 10:12 ` Linus Walleij
2013-11-12 2:36 ` Ben Gamari
2013-11-13 9:15 ` Jiří Prchal
2013-11-13 14:56 ` Ben Gamari
2013-11-18 10:05 ` 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=871u2k49cd.fsf@gmail.com \
--to=bgamari.foss@gmail.com \
--cc=jiri.prchal@aksignal.cz \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=mark.rutland@arm.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).