From: Linus Walleij <linus.walleij@linaro.org>
To: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: "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>,
Tomasz Figa <tomasz.figa@gmail.com>,
Sylwester Nawrocki <sylvester.nawrocki@gmail.com>
Subject: Re: [PATCH v4] gpio: pcf857x: Add OF support
Date: Thu, 29 Aug 2013 14:16:59 +0200 [thread overview]
Message-ID: <CACRpkdZuODowd6V9WcCes6znT15C105y_kfYynhien4ZCCaoOA@mail.gmail.com> (raw)
In-Reply-To: <1377524753-4027-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com>
On Mon, Aug 26, 2013 at 3:45 PM, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> Add DT bindings for the pcf857x-compatible chips and parse the device
> tree node in the driver.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
First: can I get an ACK from some DT-bindings maintainer?
I think you may need to CC them all individually to get some
response.
> +++ b/Documentation/devicetree/bindings/gpio/gpio-pcf857x.txt
> @@ -0,0 +1,71 @@
> +* PCF857x-compatible I/O expanders
> +
> +The PCF857x-compatible chips have "quasi-bidirectional" I/O pins that can be
> +driven high by a pull-up current source or driven low to ground. This combines
> +the direction and output level into a single bit per pin, which can't be read
> +back. We can't actually know at initialization time whether a pin is configured
> +(a) as output and driving the signal low/high, or (b) as input and reporting a
> +low/high value, without knowing the last value written since the chip came out
> +of reset (if any). The only reliable solution for setting up pin direction is
> +thus to do it explicitly.
Nitpick: I prefer that wrt gpio we talk about "lines" rather than "pins"
to separate it from the pin control concept. Just
s/pin/line/g
(...)
> +Optional Properties:
> +
> + - pins-initial-state: Bitmask that specifies the initial state of each pin.
> + When a bit is set to zero, the corresponding pin will be initialized to the
> + input (pulled-up) state. When the bit is set to one, the pin will be
> + initialized the the low-level output state. If the property is not specified
> + all pins will be initialized to the input state.
Name this lines-initial-states (pluralis).
Don't we want to do this generic if we shall do it?
Like for *any* GPIO chips we provide lines-initial state in the device
tree and some code in the gpiochip with a callback in struct gpio_chip
that can be called by the gpiolib core to set this up? Then we don't
have to reimplement this for every GPIO controller that needs it.
Sorry for not noticing this earlier...
Yours,
Linus Walleij
next prev parent reply other threads:[~2013-08-29 12:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-26 13:45 [PATCH v4] gpio: pcf857x: Add OF support Laurent Pinchart
2013-08-29 12:16 ` Linus Walleij [this message]
2013-08-30 0:05 ` Laurent Pinchart
2013-08-30 8:07 ` Linus Walleij
2013-08-30 10:17 ` Laurent Pinchart
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=CACRpkdZuODowd6V9WcCes6znT15C105y_kfYynhien4ZCCaoOA@mail.gmail.com \
--to=linus.walleij@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=laurent.pinchart+renesas@ideasonboard.com \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sylvester.nawrocki@gmail.com \
--cc=tomasz.figa@gmail.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).