kernel_optimize_test/drivers/gpio
Ben Gardner a8a5164c29 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>
2010-03-06 11:26:48 -08:00
..
adp5520-gpio.c gpio: adp5520: rename common defines and typos 2009-12-13 19:20:51 +01:00
adp5588-gpio.c gpio: adp5588-gpio: new driver for ADP5588 GPIO expanders 2010-01-11 09:34:07 -08:00
bt8xxgpio.c gpio: include <linux/gpio.h> not <asm/gpio.h> 2009-09-23 07:39:48 -07:00
cs5535-gpio.c gpio: cs5535-gpio: fix input direction 2010-03-06 11:26:48 -08:00
gpiolib.c gpio: introduce gpio_request_one() and friends 2010-03-06 11:26:48 -08:00
Kconfig gpio: pca953x.c: add interrupt handling capability 2010-03-06 11:26:48 -08:00
langwell_gpio.c gpio: fix test on unsigned in lnw_irq_type() 2009-12-16 07:20:00 -08:00
Makefile gpio: add driver for MAX7300 I2C GPIO extender 2010-03-06 11:26:48 -08:00
max730x.c gpio: add driver for MAX7300 I2C GPIO extender 2010-03-06 11:26:48 -08:00
max732x.c gpio: fix probe() error return in gpio driver probes 2009-01-15 16:39:35 -08:00
max7300.c gpio: add driver for MAX7300 I2C GPIO extender 2010-03-06 11:26:48 -08:00
max7301.c gpio: add driver for MAX7300 I2C GPIO extender 2010-03-06 11:26:48 -08:00
mc33880.c gpio: add MC33880 driver 2009-09-23 07:39:46 -07:00
mcp23s08.c gpio: include <linux/gpio.h> not <asm/gpio.h> 2009-09-23 07:39:48 -07:00
pca953x.c gpio: pca953x.c: add interrupt handling capability 2010-03-06 11:26:48 -08:00
pcf857x.c Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2009-09-23 09:30:48 -07:00
pl061.c bitops: rename for_each_bit() to for_each_set_bit() 2010-03-06 11:26:23 -08:00
timbgpio.c timbgpio: add support for interrupt triggering on both flanks 2010-03-06 11:26:48 -08:00
twl4030-gpio.c mfd: Rename all twl4030_i2c* 2009-12-13 21:23:33 +01:00
ucb1400_gpio.c mfd/gpio: add a GPIO interface to the UCB1400 MFD chip driver via gpiolib 2009-09-23 07:39:48 -07:00
vr41xx_giu.c headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
wm831x-gpio.c gpiolib: Implement gpio_to_irq() for wm831x 2009-12-13 19:21:44 +01:00
xilinx_gpio.c GPIO: add new Xilinx driver for powerpc 2008-11-12 17:17:16 -08:00