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]
Message-ID: <197f3134-96fa-484f-a5f5-36779c54b340@denx.de>
Date: Mon, 20 Jan 2025 10:02:33 +0100
From: Marek Vasut <marex@...x.de>
To: linux-leds@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>, Andrew Lunn <andrew@...n.ch>,
 Eric Dumazet <edumazet@...gle.com>, Heiner Kallweit <hkallweit1@...il.com>,
 Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
 Russell King <linux@...linux.org.uk>, netdev@...r.kernel.org
Subject: Re: [PATCH] net: phy: Handle both led@0 and led subnode name for
 single-LED PHYs

On 1/20/25 9:25 AM, Marek Vasut wrote:
> In case a PHY supports only one LED in total, like ADIN1300, and this LED
> is described in DT, it is currently necessary to include unit address in
> the LED node name and the address-cells have to be set to 1:
> 
> leds {
>    #address-cells = <1>;
>    ...
>    led@0 {
>      reg = <0>;
>      ...
>    };
> };
> 
> For a single LED PHY, this should not be necessary and plain 'led' node
> without unit should be acceptable as well:
> 
> leds {
>    ...
>    led {
>      ...
>    };
> };
> 
> Handle this special case. In case reg property is not present in the leds
> node subnode, test whether the leds node contains exactly one subnode, and
> if so, assume this is the one single LED with reg property set to 0.
> 
> Signed-off-by: Marek Vasut <marex@...x.de>
Please ignore, V2 is coming with a trivial fix for variable rename.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ