From: Andres Salomon <dilinger@collabora.co.uk>
To: Ben Gardner <gardner.ben@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org,
David Brownell <dbrownell@users.sourceforge.net>,
Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject: Re: [PATCH] gpio: cs5535-gpio: fix input direction
Date: Mon, 1 Mar 2010 14:41:53 -0500 [thread overview]
Message-ID: <20100301144153.735690aa@droptest.queued.net> (raw)
In-Reply-To: <808c8e9d1003010804r331d39a6g9cf520cb27595e75@mail.gmail.com>
On Mon, 1 Mar 2010 10:04:19 -0600
Ben Gardner <gardner.ben@gmail.com> wrote:
> gpio: cs5535-gpio: fix input direction
>
> The cs5535-gpio driver's get() function was returning the output value.
> This means that the GPIO pins would never work as an input, even if configured
> as an input.
> The driver should return the READ_BACK value, which is the sensed line value.
> To make that work when the direction is 'output', INPUT_ENABLE needs to be set.
>
> In addition, the driver was not disabling OUTPUT_ENABLE when the
> direction is set to 'input'. That would cause the GPIO to continue to
> drive the pin if the direction was ever set to output.
>
> This issue was noticed when attempting to use the gpiolib driver to read
> an external input. I had previously been using the char/cs5535-gpio driver.
>
> This patch should also be applied to 2.6.33.x, as that is the first version
> that contains the gpio/cs5535-gpio driver.
>
> Signed-off-by: Ben Gardner <gardner.ben@gmail.com>
> CC: Andres Salomon <dilinger@collabora.co.uk>
Looked it over and tested it, seems fine to me. Thanks!
Acked-by: Andres Salomon <dilinger@collabora.co.uk>
prev parent reply other threads:[~2010-03-01 19:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-01 16:04 Ben Gardner
2010-03-01 19:41 ` Andres Salomon [this message]
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=20100301144153.735690aa@droptest.queued.net \
--to=dilinger@collabora.co.uk \
--cc=akpm@linux-foundation.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=dbrownell@users.sourceforge.net \
--cc=gardner.ben@gmail.com \
--cc=linux-kernel@vger.kernel.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
Powered by JetHome