[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20100301144153.735690aa@droptest.queued.net>
Date: Mon, 1 Mar 2010 14:41:53 -0500
From: Andres Salomon <dilinger@...labora.co.uk>
To: Ben Gardner <gardner.ben@...il.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org,
David Brownell <dbrownell@...rs.sourceforge.net>,
Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: Re: [PATCH] gpio: cs5535-gpio: fix input direction
On Mon, 1 Mar 2010 10:04:19 -0600
Ben Gardner <gardner.ben@...il.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@...il.com>
> CC: Andres Salomon <dilinger@...labora.co.uk>
Looked it over and tested it, seems fine to me. Thanks!
Acked-by: Andres Salomon <dilinger@...labora.co.uk>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists