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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 25 Nov 2020 11:38:22 +0100
From:   Pavel Machek <pavel@....cz>
To:     Marek Behún <marek.behun@....cz>
Cc:     linux-leds@...r.kernel.org, Dan Murphy <dmurphy@...com>,
        Ondřej Jirman <megous@...ous.com>,
        Russell King <linux@...linux.org.uk>,
        Andrew Lunn <andrew@...n.ch>, linux-kernel@...r.kernel.org,
        Matthias Schiffer <matthias.schiffer@...tq-group.com>,
        Rob Herring <robh+dt@...nel.org>, devicetree@...r.kernel.org
Subject: Re: [PATCH leds + devicetree v2 0/2] Parse DT property
 `trigger-sources` for netdev LED trigger

Hi!

> In this proposal the specific netdev LED trigger mode is determined
> from the `function` LED DT property.
> 
> Example:
>   eth0: ethernet@...00 {
>     compatible = "xyz";
>     #trigger-source-cells = <0>;
>   };
> 
>   led {
>     color = <LED_COLOR_ID_GREEN>;
>     function = LED_FUNCTION_LINK;
>     trigger-sources = <&eth0>;
>   };

> 
> When led is registered, the netdev trigger is automatically activated
> and set to light the LED on if eth0 is linked.
> 
> Please let me know if this binding is OK, or if the binding should
> instead of the `function` property determine the trigger settings from
> arguments of the `trigger-sources` property :
>   led {
>     color = <LED_COLOR_ID_GREEN>;
>     trigger-sources = <&eth0 (NETDEV_ATTR_LINK | NETDEV_ATTR_RX)>;
>   };

So... Both interfaces look relatively sane.

I might preffer the second one. For development boards, the LEDs
really have no labels (etc), thus no function -- they are user LEDs 1
to 4. But we still may want to say "user LED one should have mmc0
trigger by default".

Of course, we might also want to simply say that the LED is really mmc LED...

> I prefer the first binding, since we already have the `function`
> property. Multiple modes can be achieved by string array, but this is
> not yet implemented:
>   led {
>     color = <LED_COLOR_ID_GREEN>;
>     function = LED_FUNCTION_LINK, LED_FUNCTION_ACTIVITY;
>     trigger-sources = <&eth0>;
>   };

I don't see how multiple functions would work.

Best regards,
								Pavel
-- 
http://www.livejournal.com/~pavelmachek

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ