The gpio include file and the gpio documentation declare and document GPIOF_ACTIVE_LOW as one of the flags to be passed to gpio_request_one and related functions. However, the flag is not evaluated or used. Check the flag in gpio_request_one and set the gpio internal flag FLAG_ACTIVE_LOW if it is set. Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx> --- drivers/gpio/gpiolib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 2ebc907..43d9e34 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1842,6 +1842,9 @@ int gpio_request_one(unsigned gpio, unsigned long flags, const char *label) if (flags & GPIOF_OPEN_SOURCE) set_bit(FLAG_OPEN_SOURCE, &desc->flags); + if (flags & GPIOF_ACTIVE_LOW) + set_bit(FLAG_ACTIVE_LOW, &desc->flags); + if (flags & GPIOF_DIR_IN) err = gpiod_direction_input(desc); else -- 1.9.1 -- 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