lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0d2dcb62-8475-8b2a-7ba9-bdabab3d0aa4@gmail.com>
Date:   Mon, 3 Jul 2023 11:32:10 +0200
From:   Jacek Anaszewski <jacek.anaszewski@...il.com>
To:     Astrid Rost <astridr@...s.com>, Astrid Rost <astrid.rost@...s.com>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Rob Herring <robh@...nel.org>, Pavel Machek <pavel@....cz>,
        Lee Jones <lee@...nel.org>
Cc:     kernel@...s.com, linux-leds@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] led: led-class: Read max-brightness from
 devicetree

Hi Astrid,

On 7/3/23 09:53, Astrid Rost wrote:
> Hello Jacek,
> 
> I am having problems with the PWM controller LP5024.
> 
> https://www.ti.com/product/LP5024
> 
> There is no such a calculation in the data-sheet like:
> max_brightness = max_current / constant.
> 
> I also assume it is depending on the type of LEDs and circuit, which are 
> connected.
> 
> It supports two current modes: 25,5 mA and and 35 mA, both is to high 
> for the LEDs I have.
> 
> For max_brightness seems to be everything inside the kernel, but reading 
> the value from devicetree. I first thought I could add it in the lp50xx
> driver, but Andy and Rob thought that I better put it into the general 
> parts. And of course drivers having led-max-microamp should better use it.
> 
> Please, let me know if you have a better suggestion.

OK, since this LED controller is PWM-driven then there is no current per
brightness level granulation. Bindings of leds-pwm driver also use
max-brightness DT property. So, yeah, let's make it a common property,
but state clearly that it is mainly for drivers like PWM ones, where it
is not possible to map brightness level to the amount of current.

-- 
Best regards,
Jacek Anaszewski

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ