[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJsYDVJyeuHsXFdi-OrMX-1maQbC_wLYko6dz=unmuG6B3DL=g@mail.gmail.com>
Date: Thu, 1 Dec 2022 20:41:39 +0800
From: Chuanhong Guo <gch981213@...il.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: linux-leds@...r.kernel.org, Pavel Machek <pavel@....cz>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Stanislav Jakubek <stano.jakubek@...il.com>,
Linus Walleij <linus.walleij@...aro.org>,
Shawn Guo <shawnguo@...nel.org>,
Johan Hovold <johan+linaro@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Marijn Suijten <marijn.suijten@...ainline.org>,
Sven Schwermer <sven.schwermer@...ruptive-technologies.com>,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] dt-bindings: leds: add dt schema for worldsemi,ws2812b-spi
Hi!
On Wed, Nov 30, 2022 at 7:59 PM Krzysztof Kozlowski
<krzysztof.kozlowski@...aro.org> wrote:
> >> [...]
> >> So this is brightness of each color...
> >
> > I don't think so.
> > See the kernel doc for multicolor LED:
> > https://docs.kernel.org/leds/leds-class-multicolor.html
> > This property sets the sysfs file multi_intensity while the
> > actual LED brightness is controlled with another sysfs
> > file called 'brightness'.
> > Setting multi_intensity alone doesn't change the LED
> > brightness at all.
>
> If you had brightness, that would be correct. But you do not have
> brightness, right?
The brightness can be set using sysfs, but I didn't implement a
default brightness in my driver.
My original intent for this property is to set a default color for legacy
led softwares which can only control the brightness and doesn't
support setting the color value yet.
> Therefore the final brightness is always:
>
> subled[i].brightness = 255 * subled[i].intensity / max_brightness (also
> 255);
>
> Or your bindings are incomplete...
I do agree that adding a default-brightness will make this more
useful. I'll add this feature in the next version.
--
Regards,
Chuanhong Guo
Powered by blists - more mailing lists