Re: [PATCH 2/2 v3] leds: rt8515: Add Richtek RT8515 LED driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 11, 2020 at 12:40 PM Sakari Ailus <sakari.ailus@xxxxxx> 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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux