[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL_JsqK6+Yyn29QNV2tjUM-zm9WbuW57Jb=LKmqCLXHmvEoJYA@mail.gmail.com>
Date: Thu, 1 Dec 2022 15:47:35 -0600
From: Rob Herring <robh@...nel.org>
To: Pavel Machek <pavel@....cz>
Cc: Marek Vasut <marex@...x.de>,
Christoph Niedermaier <cniedermaier@...electronics.com>,
linux-kernel@...r.kernel.org,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Jacek Anaszewski <jacek.anaszewski@...il.com>,
kernel@...electronics.com, linux-leds@...r.kernel.org,
devicetree@...r.kernel.org
Subject: Re: [PATCH] dt-bindings: leds: Mark label property as deprecated
On Wed, Nov 30, 2022 at 1:27 PM Pavel Machek <pavel@....cz> wrote:
>
> On Wed 2022-11-30 13:19:05, Rob Herring wrote:
> > On Fri, Nov 25, 2022 at 10:26:30PM +0100, Marek Vasut wrote:
> > > On 11/22/22 13:23, Pavel Machek wrote:
> > > > Hi!
> > >
> > > Hi,
> > >
> > > > > Mark the label property as deprecated as it is mentioned
> > > > > in the description.
> > > >
> > > > Lets do it the other way around. Functions (etc) don't really provide
> > > > good enough description of LED, and label is still needed.
> > >
> > > Can you please provide a clear explanation which property or approach is the
> > > correct one for new DTs ?
> > >
> > > So far, the documentation states that "label" is deprecated, and users
> > > should replace it with "function" and "color".
> >
> > 'function' is what activity/operation the LED is associated with. It is
> > a fixed set of strings which s/w may use. It is a replacement for
> > 'linux,default-trigger'.
> >
> > 'label' is what is printed next to the LED for a human to read. 'label'
> > can be anything and the OS shouldn't care what it is.
>
> Unfortunately, no.
That's why I said 'shouldn't care', not 'doesn't care'.
'label' is also not just an LED property. It's used elsewhere, but
unfortunately the LED subsystem makes more use of it than it perhaps
should.
> We use label as a path in /sys/class/leds.
Yes, or node name if no label. That's still not really caring what the
value of label is. At least the kernel doesn't. A well behaved
userspace wouldn't either and doesn't for most classes.
> And it looks like integer
> "function" is not really adequate for describing what LED does. There
> are too many LEDs and not enough integers, and it is common to have
> same function ("activity") on multiple devices ("wifi", "mmc", "eth").
Whatever the problems are, 'label' is not the solution.
There is a way to associate leds with devices. 'trigger-source' IIRC.
Rob
Powered by blists - more mailing lists