On Tue, 12 May 2009 15:33:12 -0700
Trent Piepho <[email protected]> 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 <[email protected]>
Tested-by: Sean MacLennan <[email protected]>
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
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev