[PATCH] cs5535_gpio: gpio_chip.get should return the input value

From: Ben Gardner
Date: Tue Feb 23 2010 - 17:55:27 EST


The gpio_chip.get() function for the CS5535 GPIO driver currently returns the
output value instead of the input value.
This patch changes it to return the input value.

Signed-off-by: Ben Gardner <gardner.ben@xxxxxxxxx>
---
--- linux-2.6.33-rc8.orig/drivers/gpio/cs5535-gpio.c
+++ linux-2.6.33-rc8/drivers/gpio/cs5535-gpio.c
@@ -154,7 +154,7 @@

static int chip_gpio_get(struct gpio_chip *chip, unsigned offset)
{
- return cs5535_gpio_isset(offset, GPIO_OUTPUT_VAL);
+ return cs5535_gpio_isset(offset, GPIO_READ_BACK);
}

static void chip_gpio_set(struct gpio_chip *chip, unsigned offset, int val)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/