> Op 28 okt. 2014, om 10:50 heeft Chen-Yu Tsai <[email protected]> het volgende > geschreven: > > The A80 Optimus board has 3 usable LEDs that are controlled via GPIO. > > This patch adds support for 2 of them which are driver by GPIOs in the > main pin controller. The remaining one uses GPIO from the R_PIO > controller, which we don't support yet.
Out of curiousity, are those LEDs labeled and if so, would it make sense to assign default triggers matching the labels to them? As a personal preference I tend to have one of the LEDs use the 'heartbeat' trigger so I can see that it's alive. regards, Koen > > Signed-off-by: Chen-Yu Tsai <[email protected]> > --- > arch/arm/boot/dts/sun9i-a80-optimus.dts | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) > > diff --git a/arch/arm/boot/dts/sun9i-a80-optimus.dts > b/arch/arm/boot/dts/sun9i-a80-optimus.dts > index 25fe775..91eda76 100644 > --- a/arch/arm/boot/dts/sun9i-a80-optimus.dts > +++ b/arch/arm/boot/dts/sun9i-a80-optimus.dts > @@ -64,6 +64,13 @@ > /* Enable internal pull-up */ > allwinner,pull = <1>; > }; > + > + led_pins_optimus: led_pins@0 { > + allwinner,pins = "PH0", "PH1"; > + allwinner,function = "gpio_out"; > + allwinner,drive = <0>; > + allwinner,pull = <0>; > + }; > }; > > uart0: serial@07000000 { > @@ -78,4 +85,22 @@ > status = "okay"; > }; > }; > + > + leds { > + compatible = "gpio-leds"; > + pinctrl-names = "default"; > + pinctrl-0 = <&led_pins_optimus>; > + > + led2 { > + label = "a80_optimus:led2:usr"; > + gpios = <&pio 7 0 0>; > + }; > + > + /* led3 is on PM15, in R_PIO */ > + > + led4 { > + label = "a80_optimus:led4:usr"; > + gpios = <&pio 7 1 0>; > + }; > + }; > }; > -- > 2.1.1 > > -- > You received this message because you are subscribed to the Google Groups > "linux-sunxi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
