The changeset introduces BGPIOF_READ_OUTPUT_REG_SET flag to bgpio_init() function, which is if provided allows to get stored value of output GPIO line in "set" register instead of default "data" register. The same functionality is already implemented in moxart driver by a private function, move it to gpio-generic.c since at least iMX GPIO controllers require it as well. Fixes a problem on iMX platforms: % echo out > /sys/class/gpio/gpio9/direction % cat /sys/class/gpio/gpio9/value 0 % echo 1 > /sys/class/gpio/gpio9/value % cat /sys/class/gpio/gpio9/value 0 Vladimir Zapolskiy (4): Revert "gpio: generic: clamp retured value to [0,1]" gpio: gpio-generic: add flag to read out output value from reg_set gpio: moxart: get value of output gpio from generic driver gpio: mxc: read output value from GPIO_DR register drivers/gpio/gpio-generic.c | 24 ++++++++++++++++++++---- drivers/gpio/gpio-moxart.c | 17 +++-------------- drivers/gpio/gpio-mxc.c | 3 ++- include/linux/basic_mmio_gpio.h | 1 + 4 files changed, 26 insertions(+), 19 deletions(-) -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html