Messages in this thread | | | Date | Wed, 24 Feb 2010 21:52:07 -0600 | Subject | Re: [PATCH] cs5535_gpio: gpio_chip.get should return the input value | From | Ben Gardner <> |
| |
>> --- 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) > > <presses F10> > > What were the user-visible effects of this bug?
The user-visible effects were that the input didn't work. I use the CS5535 chip in a custom board that uses GPIO 25 and 26 as voltage monitoring inputs (external voltage comparators). Since the char-based cs5535-gpio is now deprecated, I'm trying out the gpio driver. I export the GPIO pins via sysfs to access them from user-space. Reading the 'value' member didn't reflect the input.
Personally, I would prefer a separate sysfs entry for the output and the input, since the GPIO pins can be both outputs and inputs, but that would require a gpiolib change. Since there doesn't appear to be a gpio maintainer, any change to that might be tricky.
Ben -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |