From: David Brownell <david-b@pacbell.net>
To: lvcargnini@gmail.com
Cc: linux-omap@vger.kernel.org
Subject: Re: GPIO issue
Date: Tue, 15 Apr 2008 15:55:15 -0700 [thread overview]
Message-ID: <200804151555.15722.david-b@pacbell.net> (raw)
In-Reply-To: <ae36f8040804151539t50ecece8v867977c7fe7f7578@mail.gmail.com>
On Tuesday 15 April 2008, Luís Vitório Cargnini wrote:
>
> excuse me now I saw I just put the wrong value in set_direction
> omap_set_gpio_direction(8,1);
>
> must be
> omap_set_gpio_direction(8,0);
This is one of *many* reasons to avoid using those
legacy GPIO calls. If you had written
gpio_direction_input(8)
instead of that first call, the issue would have been obvious. :)
if (gpio_request(8, "signal_name") == 0)
gpio_direction_output(8, 1 /* initial value */);
else
/* ERROR */ ;
Note that /sys/kernel/debug/gpio shows GPIO status,
assuming you have debugfs mounted in the normal way.
- Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2008-04-15 22:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-15 22:29 GPIO issue Luís Vitório Cargnini
2008-04-15 22:39 ` Luís Vitório Cargnini
2008-04-15 22:55 ` David Brownell [this message]
[not found] ` <ae36f8040804151600j2319929epeb6a9e54db28d2ea@mail.gmail.com>
2008-04-15 23:04 ` David Brownell
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=200804151555.15722.david-b@pacbell.net \
--to=david-b@pacbell.net \
--cc=linux-omap@vger.kernel.org \
--cc=lvcargnini@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