Re: [PATCH] dt-bindings: leds: leds-gpio: fix & extend node regex

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16.03.2021 23:31, Rob Herring wrote:
On Wed, Mar 10, 2021 at 08:00:25AM +0100, Rafał Miłecki wrote:
From: Rafał Miłecki <rafal@xxxxxxxxxx>

The old regex allowed only 1 character to follow the "led-" prefix which
was most likely just an overlook.

Indeed.

Fix it and while at it allow dashes in
node names. It allows more meaningful names and it helpful e.g. when
having the same function name with 2 different colors. For example:
1. led-power-white
2. led-power-blue

No, node names are supposed to be generic and reflect the class of
device.

There was some extra discussion on this patch that has ended up with a question about numbering nodes.

Current binding assumes that nodes should be numbered with independent suffix numbers like:
led-0 { };
led-1 { };
led-2 { };

Do you think this could / should be improved somehow?

One option I was thinking about was using:
led@0 { };
led@5 { };
where numbers ("0", "5") should match GPIO numbers.

Is that a valid solution and does it improve things to make it worth it?



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux