On Thu, Dec 27, 2012 at 3:23 PM, Arnaud Patard <arnaud.patard@xxxxxxxxxxx> wrote: > The GPIOF_INIT_* flags are shifted by 1, so the value of > led_dat->active_low ^ state should be shifted by one too. Not doing it results > in active-low gpio being configured as input. > > Signed-off-by: Arnaud Patard <arnaud.patard@xxxxxxxxxxx> > Index: sascha-new/drivers/leds/leds-gpio.c > =================================================================== > --- sascha-new.orig/drivers/leds/leds-gpio.c 2012-12-26 16:24:06.050622067 +0100 > +++ sascha-new/drivers/leds/leds-gpio.c 2012-12-26 16:36:24.370589583 +0100 > @@ -127,7 +127,7 @@ static int create_gpio_led(const struct > led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME; > > ret = devm_gpio_request_one(parent, template->gpio, > - GPIOF_DIR_OUT | (led_dat->active_low ^ state), > + GPIOF_DIR_OUT | ((led_dat->active_low ^ state) << 1), > template->name); > if (ret < 0) > return ret; > Hi Arnaud, thanks for the patch. I sent a fix for this a few days ago too [1] but still I haven't had any feedback. I think this is a pretty important bug since configuring the GPIO as inputs makes the LEDs to not work. Thanks a lot and best regards, Javier [1]: https://patchwork.kernel.org/patch/1903601/ -- To unsubscribe from this list: send the line "unsubscribe linux-leds" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html