On Tue, 12 May 2009 15:33:12 -0700 Trent Piepho <xy...@speakeasy.org> wrote:
> + if (!strcmp(state, "keep")) { > + led.default_state = > LEDS_GPIO_DEFSTATE_KEEP; > + } else if(!strcmp(state, "on")) { > + led.default_state = > LEDS_GPIO_DEFSTATE_ON; > + } else { > + led.default_state = > LEDS_GPIO_DEFSTATE_OFF; > + } Just a nitpick, you don't need the {} braces here. Other than that: Acked-by: Sean MacLennan <smaclen...@pikatech.com> Tested-by: Sean MacLennan <smaclen...@pikatech.com> Tested on a warp with the following: power-leds { compatible = "gpio-leds"; green { gpios = <&GPIO1 0 0>; default-state = "on"; }; red { gpios = <&GPIO1 1 0>; default-state = "keep"; }; }; I tested with both the red LED initially off and initially on as set in u-boot. Cheers, Sean _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev