From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pinctrl: document the "GPIO mode" pitfall
Date: Fri, 26 Apr 2013 01:15:09 +0200 [thread overview]
Message-ID: <1761651.lXztZzrj1S@avalon> (raw)
In-Reply-To: <CACRpkdag=YTeQH=VjW4fQ+G94REWeURhC=ErJxjmSUuP=pKYbA@mail.gmail.com>
Hi Linus,
On Thursday 25 April 2013 23:39:18 Linus Walleij wrote:
> On Tue, Apr 23, 2013 at 3:33 PM, Laurent Pinchart wrote:
> >> +And your machine configuration may look like this:
> >> +--------------------------------------------------
> >> +
> >> +static unsigned long uart_default_mode[] = {
> >> + PIN_CONF_PACKED(PIN_CONFIG_DRIVE_PUSH_PULL, 0),
> >> +};
> >> +
> >> +static unsigned long uart_sleep_mode[] = {
> >> + PIN_CONF_PACKED(PIN_CONFIG_OUTPUT, 0),
> >> +};
> >
> > I'm having a bit of trouble with PIN_CONFIG_DRIVE_PUSH_PULL and
> > PIN_CONFIG_OUTPUT. Strictly speaking, when configured in output mode, the
> > pin will be in a push-pull configuration.
>
> For your system or for any system? Open drain, open source are also
> output modes, and none of them are push-pull.
Indeed. I was actually thinking about the opposite, push-pull is output.
> > Could you clarify the exact scope of the two configuration parameters ?
>
> PIN_CONFIG_OUTPUT is left a bit unspecified, but here the idea was a passive
> drive, like just connecting the pin to VDD or GND without any driver stage
> at all.
Isn't that a driver stage ? :-)
> Maybe I should patch the documentation since we seem to be the only user?
>
> In the above case (which is derived from the ABx500) I think what is
> happening is that the pin is connected to ground during sleep, without any
> enabled driver stages, which saves a lot of power, since you do not need to
> bias the totempole during sleep in that way.
Right. What is unclear to me is the interaction between OUTPUT and DRIVE_*.
That's the part I would like to see clarified. Does DRIVE_* imply that the pin
is driven by the selected function, and OUTPUT imply that the pin is driven to
a fixed level ? If so, how do you configure the drive type of a pin that will
be used through the GPIO API ? What about cases where I want to drive the pin
to a fixed level in a non low-power output mode (for instance because I need
more current that what the low-power output mode provides) ?
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2013-04-25 23:15 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 11:07 [PATCH] pinctrl: document the "GPIO mode" pitfall Linus Walleij
2013-03-15 20:53 ` Stephen Warren
2013-04-23 13:33 ` Laurent Pinchart
2013-04-25 21:39 ` Linus Walleij
2013-04-25 23:15 ` Laurent Pinchart [this message]
2013-04-26 8:49 ` Linus Walleij
2013-04-27 1:16 ` Laurent Pinchart
2013-05-12 23:36 ` 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=1761651.lXztZzrj1S@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).