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

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

 



On 23.03.2021 23:02, Rob Herring wrote:
On Tue, Mar 16, 2021 at 5:25 PM Rafał Miłecki <rafal@xxxxxxxxxx> wrote:

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?

No, we have other ways for meaningful names (label, color, function, etc.).

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?

What if you have <gpioa 1> and <gpiob 1>?

The cells in a consumer for a provider are opaque to the consumer.

Thanks a lot for helping me understand that, it make sense ofc.



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux