linux-leds.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafał Miłecki" <rafal@milecki.pl>
To: Rob Herring <robh@kernel.org>
Cc: "Rafał Miłecki" <zajec5@gmail.com>, "Pavel Machek" <pavel@ucw.cz>,
	"Dan Murphy" <dmurphy@ti.com>,
	"Jacek Anaszewski" <jacek.anaszewski@gmail.com>,
	"Linux LED Subsystem" <linux-leds@vger.kernel.org>,
	devicetree@vger.kernel.org,
	"Florian Fainelli" <f.fainelli@gmail.com>
Subject: Re: [PATCH] dt-bindings: leds: leds-gpio: fix & extend node regex
Date: Tue, 23 Mar 2021 23:07:44 +0100	[thread overview]
Message-ID: <ada9e6e0-ab1b-e86a-812b-e2e087594539@milecki.pl> (raw)
In-Reply-To: <CAL_JsqL5fPhVCHtUZjoWy6O-y0JWdLTyNDHWv=t64OvUje2Rsg@mail.gmail.com>

On 23.03.2021 23:02, Rob Herring wrote:
> On Tue, Mar 16, 2021 at 5:25 PM Rafał Miłecki <rafal@milecki.pl> 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@milecki.pl>
>>>>
>>>> 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.

      reply	other threads:[~2021-03-23 23:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-10  7:00 [PATCH] dt-bindings: leds: leds-gpio: fix & extend node regex Rafał Miłecki
2021-03-12  7:44 ` Marek Behun
2021-03-12  7:52   ` Rafał Miłecki
2021-03-12  8:23     ` Marek Behun
2021-03-12  9:12       ` Rafał Miłecki
2021-03-12  9:26         ` Marek Behun
2021-03-12  9:42           ` Rafał Miłecki
2021-03-16 22:31 ` Rob Herring
2021-03-16 22:44   ` Rafał Miłecki
2021-03-23 22:02     ` Rob Herring
2021-03-23 22:07       ` Rafał Miłecki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ada9e6e0-ab1b-e86a-812b-e2e087594539@milecki.pl \
    --to=rafal@milecki.pl \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=f.fainelli@gmail.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=robh@kernel.org \
    --cc=zajec5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).