From: Linus Walleij <linus.walleij@linaro.org>
To: Sakari Ailus <sakari.ailus@iki.fi>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>,
Pavel Machek <pavel@ucw.cz>, Dan Murphy <dmurphy@ti.com>,
Linux LED Subsystem <linux-leds@vger.kernel.org>,
newbytee@protonmail.com, Stephan Gerhold <stephan@gerhold.net>
Subject: Re: [PATCH 2/2 v3] leds: rt8515: Add Richtek RT8515 LED driver
Date: Wed, 11 Nov 2020 17:34:58 +0100 [thread overview]
Message-ID: <CACRpkdYK+X==Xm3AfymV_HEaZHOvPS-LtCLKZXc2jmzV7KUZoQ@mail.gmail.com> (raw)
In-Reply-To: <20201111113848.GX6899@valkosipuli.retiisi.org.uk>
On Wed, Nov 11, 2020 at 12:40 PM Sakari Ailus <sakari.ailus@iki.fi> wrote:
> On Wed, Nov 11, 2020 at 02:14:17AM +0100, Linus Walleij wrote:
> > + } else if (brightness < RT8515_TORCH_MAX) {
> > + /* Step it up to movie mode brightness using the flash pin */
> > + rt8515_gpio_brightness_commit(rt->ent, brightness);
>
> What's the unit of brightness here? If you don't know the unit, you could
> still assume something and fix it later if needed. Or the current could be
> just measured.
>
> It's usually linear but if the number of steps is small then logarithmic
> scale is also not unforeseen.
I will try to come up with something...
> > + } else {
> > + /* Max torch brightness requested */
> > + gpiod_set_value(rt->ent, 1);
>
> What's the current in this case? The maximum really should come from DT to
> avoid frying components.
The way I understand it is that this component contains its own
current regulation electronic. You request a brightness
between 1-100 and it will support this range (no external
current boost). And as a user that is "all you need to know".
Isn't this problem more prevalent when you have some kind of
external current-regulator that you need to program?
This component draws its power directly from VBAT (the main
battery) so regulating how much of that it takes is up to the
component.
I could think of the component brightness being a problem if
the flash is embedded in some kind of plastic that cannot
take the heat though, but I haven't seen any code trying to
hold it down for this reason. I suppose the component
datasheet (that I don't have) specifies all these things...
Yours,
Linus Walleij
next prev parent reply other threads:[~2020-11-11 16:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-11 1:14 [PATCH 1/2 v3] dt-bindings: leds: Add DT binding for Richtek RT8515 Linus Walleij
2020-11-11 1:14 ` [PATCH 2/2 v3] leds: rt8515: Add Richtek RT8515 LED driver Linus Walleij
2020-11-11 7:59 ` Pavel Machek
2020-11-11 11:38 ` Sakari Ailus
2020-11-11 16:34 ` Linus Walleij [this message]
2020-11-11 16:55 ` Sakari Ailus
2020-11-11 22:07 ` Linus Walleij
2020-11-12 10:24 ` Sakari Ailus
2020-11-25 19:35 ` Pavel Machek
2020-11-11 11:04 ` [PATCH 1/2 v3] dt-bindings: leds: Add DT binding for Richtek RT8515 Sakari Ailus
2020-11-11 13:44 ` Linus Walleij
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='CACRpkdYK+X==Xm3AfymV_HEaZHOvPS-LtCLKZXc2jmzV7KUZoQ@mail.gmail.com' \
--to=linus.walleij@linaro.org \
--cc=dmurphy@ti.com \
--cc=jacek.anaszewski@gmail.com \
--cc=linux-leds@vger.kernel.org \
--cc=newbytee@protonmail.com \
--cc=pavel@ucw.cz \
--cc=sakari.ailus@iki.fi \
--cc=stephan@gerhold.net \
/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).