Re: [PATCH v2 07/11] ARM: dts: mstar: unitv2: Wire up LEDs

Daniel Palmer
2021-12-02T09:41:24Z

Hi Pavel,

On Wed, 1 Dec 2021 at 03:56, Pavel Machek <pavel@ucw.cz> wrote:
>
> Hi!
>
> > Add the red and white leds present on the unitv2.
>
> Thanks for cc-ing me.
>
> > @@ -18,6 +20,18 @@ aliases {
> > chosen {
> > stdout-path = "serial0:115200n8";
> > };
> > +
> > + leds {
> > + compatible = "gpio-leds";
> > + led-white {
> > + gpios = <&gpio SSD20XD_GPIO_GPIO0 GPIO_ACTIVE_LOW>;
> > + linux,default-trigger = "activity";
> > + };
> > + led-red {
> > + gpios = <&gpio SSD20XD_GPIO_GPIO1 GPIO_ACTIVE_LOW>;
> > + linux,default-trigger = "heartbeat";
> > + };
> > + };
>
> How do these look in userspace (ls /sys/class/leds)?

From what I remember the above results in /sys/class/leds/red and
/sys/class/leds/white.
I'll check though. Is there something wrong with that? :)

>Should the first one be disk-activity?

Good question. My personal preference was for some sort of load
indicator as it helped me when debugging. That's why I have heartbeat
and activity. An "I'm alive signal" and some indication of how much is
going on.
I'm not sure if disk-activity is too useful with these devices as they
usually have everything in a very small rootfs and don't do lots of
disk io because they have pretty small SPI NAND flash for local
storage. Also there isn't anything in mainline that'll trigger the
disk-activity trigger at the moment.
As "activity" isn't documented in the bindings and I don't think I got
an answer from Rob about it, maybe I'll just drop the trigger for now.

Cheers,

Daniel