summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/Kconfig
diff options
context:
space:
mode:
authorBen Gardner <gardner.ben@gmail.com>2010-03-05 22:44:38 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-06 20:26:48 +0100
commita8a5164c297c16c2f4be776714ca47dba252cc3d (patch)
tree03a3d1a4692d31a22a55cdce48c7edcf66394843 /drivers/gpio/Kconfig
parentgpio: pca953x.c: add interrupt handling capability (diff)
downloadlinux-a8a5164c297c16c2f4be776714ca47dba252cc3d.tar.xz
linux-a8a5164c297c16c2f4be776714ca47dba252cc3d.zip
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. Signed-off-by: Ben Gardner <gardner.ben@gmail.com> Acked-by: Andres Salomon <dilinger@collabora.co.uk> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: <stable@kernel.org> [2.6.33.x] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/gpio/Kconfig')
0 files changed, 0 insertions, 0 deletions