2019-12-21 19:20:07

by Pavel Machek

[permalink] [raw]
Subject: Re: [PATCH 2/2] leds: lm3692x: Allow to set ovp and brigthness mode

Hi!

> Overvoltage protection and brightness mode are currently hardcoded
> as disabled in the driver. Make these configurable via DT.

What exactly is overvoltage protection good for? Should we default to
29V if we have no other information?

> Signed-off-by: Guido G?nther <[email protected]>

> + ret = device_property_read_u32(&led->client->dev,
> + "ti,overvoltage-volts", &ovp);
> + if (!ret) {
> + switch (ovp) {
> + case 0:
> + break;
> + case 22:
> + led->boost_ctrl |= LM3692X_OVP_21V;
> + break;

Should be case 21.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


Attachments:
(No filename) (719.00 B)
signature.asc (188.00 B)
Digital signature
Download all attachments

2019-12-24 11:27:09

by Guido Günther

[permalink] [raw]
Subject: Re: [PATCH 2/2] leds: lm3692x: Allow to set ovp and brigthness mode

Hi,
On Sat, Dec 21, 2019 at 08:18:44PM +0100, Pavel Machek wrote:
> Hi!
>
> > Overvoltage protection and brightness mode are currently hardcoded
> > as disabled in the driver. Make these configurable via DT.
>
> What exactly is overvoltage protection good for? Should we default to
> 29V if we have no other information?

The OVP protects the IC from overvoltage conditions on the output side.
While looking at the manual again I noticed that i misremembered the
'00' value which means 17V - not unprotected. Also the chip defaults
to 29V OVP so i've adjusted that too.

Cheers,
-- Guido

>
> > Signed-off-by: Guido G?nther <[email protected]>
>
> > + ret = device_property_read_u32(&led->client->dev,
> > + "ti,overvoltage-volts", &ovp);
> > + if (!ret) {
> > + switch (ovp) {
> > + case 0:
> > + break;
> > + case 22:
> > + led->boost_ctrl |= LM3692X_OVP_21V;
> > + break;
>
> Should be case 21.
> Pavel
> --
> (english) http://www.livejournal.com/~pavelmachek
> (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html