Re: [PATCH v2 8/9] ARM: dts: Add leds support to STM32F429 Discovery board

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2015-10-26 14:41 GMT+01:00 Linus Walleij <linus.walleij@xxxxxxxxxx>:
> On Sat, Oct 17, 2015 at 7:23 PM, Maxime Coquelin
> <mcoquelin.stm32@xxxxxxxxx> wrote:
>
>> Signed-off-by: Maxime Coquelin <mcoquelin.stm32@xxxxxxxxx>
> (...)
>> +       leds {
>> +               compatible = "gpio-leds";
>> +               red {
>> +                       gpios = <&gpiog 14 0>;
>> +               };
>> +               green {
>> +                       gpios = <&gpiog 13 0>;
>> +               };
>
> I suggest you add labels to these LEDs.
>
> label = "red-LED"
> label = "green-LED"
>
> This make things so much easier in sysfs.

I'm not sure to understand where it makes things easier in sysfs.
This is the sysfs path for the red led:
/sys/class/leds/red/

Indeed, if label is not present, it gets the node name.

>
> Usually people also want to add a default linux,trigger to these,
> like linux,default-trigger = "heartbeat"; but whatever you prefer.

Makes sense, I will add default trigger in next version.

> Acked-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

Thanks!
Maxime
--
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



[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux