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@xxxxxxx>
Please ignore, V2 is coming with a trivial fix for variable rename.