lkml.org 
[lkml]   [2019]   [Dec]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 6/6] leds: lm3692x: Make sure we don't exceed the maximum led current
On Wed 2019-12-25 12:07:19, Guido Günther wrote:
1;2802;0c> The current is given by the formular from page 12 of
> https://www.ti.com/lit/ds/symlink/lm36922.pdf. We use this to limit the
> led's max_brightness using the led-max-microamp DT property.
>
> The formular for the lm36923 is identical according to the data
sheet.

formula?

> static int lm3692x_probe_dt(struct lm3692x_led *led)
> {
> struct fwnode_handle *child = NULL;
> struct led_init_data init_data = {};
> - u32 ovp;
> + u32 ovp, max_cur;
> bool exp_mode;
> int ret;
>
> @@ -397,6 +416,10 @@ static int lm3692x_probe_dt(struct lm3692x_led *led)
> return ret;
> }
>
> + fwnode_property_read_u32(child, "led-max-microamp", &max_cur);
> + led->led_dev.max_brightness = ret ? LED_FULL :
> + lm3692x_max_brightness(led, max_cur);
> +

Umm. Should ret come from this fwnode_property_read_u32()?

With that fixed,

Acked-by: Pavel Machek <pavel@ucw.cz>

(Feel free to wait for Rob before resending the series, and I guess
you can merge it with the next one).

Best regards,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2019-12-26 11:14    [W:0.052 / U:10.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site