lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211202191904.GA3286@duo.ucw.cz>
Date:   Sun, 2 Oct 2022 12:26:59 +0200
From:   Pavel Machek <pavel@....cz>
To:     Daniel Palmer <daniel@...f.com>
Cc:     DTML <devicetree@...r.kernel.org>,
        "open list:GPIO SUBSYSTEM" <linux-gpio@...r.kernel.org>,
        linux-leds@...r.kernel.org,
        Linus Walleij <linus.walleij@...aro.org>,
        Bartosz Golaszewski <bgolaszewski@...libre.com>,
        Rob Herring <robh+dt@...nel.org>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 07/11] ARM: dts: mstar: unitv2: Wire up LEDs

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? :)

Yes.

LEDs are supposed to be named device:color:function. Did manufacturer
somehow label them? See also Documentation/leds/well-known-leds.txt .

> >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.

CPU activity is fine, too, but we want that option documented as you
did later in the series.

Best regards,
								Pavel

-- 
http://www.livejournal.com/~pavelmachek

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ