From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Martin Kurbanov <MMKurbanov@sberdevices.ru>,
Pavel Machek <pavel@ucw.cz>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Jonathan Corbet <corbet@lwn.net>,
Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: "linux-leds@vger.kernel.org" <linux-leds@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
kernel <kernel@sberdevices.ru>
Subject: Re: [PATCH v1 1/2] dt-bindings: leds: add binding for aw200xx
Date: Fri, 2 Dec 2022 17:41:37 +0100 [thread overview]
Message-ID: <620b19f5-2202-21a5-7e3b-816dcd42d1b4@linaro.org> (raw)
In-Reply-To: <0a9e7d65-4ad7-b753-ec9b-8e58a549b5db@sberdevices.ru>
On 28/11/2022 18:43, Martin Kurbanov wrote:
> Hi. Thank you for quick reply.
>
> On 25.11.2022 11:29, Krzysztof Kozlowski wrote:
>>> +
>>> + imax:
>>> + maxItems: 1
>>> + description:
>>> + Maximum supply current, see dt-bindings/leds/leds-aw200xx.h
>>
>> No. Use existing properties from common.yaml. This looks like
>> led-max-microamp and it is per LED, not per entire device.
>
> The AW200XX LED chip does not support imax setup per led.
> Imax is the global parameter over the all leds. I suppose, it's better
> to add vendor prefix or take minimum from all subnodes?
> How do you think?
Have in mind that led-max-microamp is a required property in some cases,
so skipping it and using per-device properties does not solve the
problem of adjusting proper currents. What if each LED you set for
something which in total gives more than your imax?
>
>
>>> +/* Global max current (IMAX) */
>>> +#define AW200XX_IMAX_3_3MA 8
>>> +#define AW200XX_IMAX_6_7MA 9
>>
>> No. Bindings are not for storing register constants. Feel free to store
>> here IDs (ID start from 0 or 1 and is incremented by 1)... but how the
>> IMAX even matches any need for "ID"?
>
> IMAX can be chosen from the predefined values in the
> datasheet (10mA, 20mA, etc). Do you mean the IMAX should be round down
> to nearest supported value in the driver?
What Linux driver support does not matter here. Bindings should reflect
hardware and the same time not store register constants but logical
values (for current this is in uA).
Best regards,
Krzysztof
next prev parent reply other threads:[~2022-12-02 16:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-24 20:48 [PATCH v1 0/2] leds: add aw20xx driver Martin Kurbanov
2022-11-24 20:48 ` [PATCH v1 1/2] dt-bindings: leds: add binding for aw200xx Martin Kurbanov
2022-11-25 8:29 ` Krzysztof Kozlowski
2022-11-28 17:43 ` Martin Kurbanov
2022-12-02 16:41 ` Krzysztof Kozlowski [this message]
2022-12-02 18:53 ` Dmitry Rokosov
2022-12-03 10:44 ` Krzysztof Kozlowski
2022-11-24 20:48 ` [PATCH v1 2/2] leds: add aw20xx driver Martin Kurbanov
2022-11-25 2:37 ` kernel test robot
2022-11-25 8:19 ` Krzysztof Kozlowski
2022-11-28 17:45 ` Martin Kurbanov
2022-12-07 19:48 ` Pavel Machek
2022-11-25 19:17 ` kernel test robot
2022-12-07 19:49 ` Pavel Machek
2022-12-31 15:44 ` kernel test robot
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=620b19f5-2202-21a5-7e3b-816dcd42d1b4@linaro.org \
--to=krzysztof.kozlowski@linaro.org \
--cc=MMKurbanov@sberdevices.ru \
--cc=andy.shevchenko@gmail.com \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=kernel@sberdevices.ru \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=robh+dt@kernel.org \
/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).