From: Ayman El-Khashab <ayman@elkhashab.com>
To: Bill Gatliff <bgat@billgatliff.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: How to set GPIO state in the dts or in platform
Date: Tue, 05 Jan 2010 23:08:40 -0600 [thread overview]
Message-ID: <4B441AD8.4050709@elkhashab.com> (raw)
In-Reply-To: <4B4413DA.7010704@billgatliff.com>
On 1/5/2010 10:38 PM, Bill Gatliff wrote:
> Ayman El-Khashab wrote:
>
>> I've got a custom board akin to the walnut. I've successfully got
>> u-boot,
>> the kernel, and a working filesystem. The only thing I lack is a
>> clear idea
>> of how to set a GPIO.
>>
>
> Isn't that the "flags" parameter, e.g.:
>
> gpios = <phandle gpioid flags>
>
> ?
>
> If you are passing a 0 for the flags, try a 1. I know of at least one
> driver that interprets that to mean a polarity inversion. Maybe you'll
> get lucky. :)
>
>
Possibly, I saw that in the documentation directory, but didn't quite
follow the explanation that
was given. Below is what I was using as a reference, but is it as
simple as that? Do the flags encode
just the state or also, the open drain, hi-z and everything else? In my
case, I want the GPIO 3 actively
driven high.
Example of the node using GPIOs:
20
21 node {
22 gpios = <&qe_pio_e 18 0>;
23 };
24
25 In this example gpio-specifier is "18 0" and encodes GPIO pin number,
26 and empty GPIO flags as accepted by the "qe_pio_e" gpio-controller.
next prev parent reply other threads:[~2010-01-06 5:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-06 4:17 How to set GPIO state in the dts or in platform Ayman El-Khashab
2010-01-06 4:38 ` Bill Gatliff
2010-01-06 5:08 ` Ayman El-Khashab [this message]
2010-01-06 15:16 ` Bill Gatliff
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=4B441AD8.4050709@elkhashab.com \
--to=ayman@elkhashab.com \
--cc=bgat@billgatliff.com \
--cc=linuxppc-dev@ozlabs.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).