lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 27 Dec 2019 13:59:39 +0100
From:   Guido Günther <agx@...xcpu.org>
To:     Pavel Machek <pavel@....cz>
Cc:     Jacek Anaszewski <jacek.anaszewski@...il.com>,
        Dan Murphy <dmurphy@...com>, Rob Herring <robh+dt@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        linux-leds@...r.kernel.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 6/6] leds: lm3692x: Make sure we don't exceed the
 maximum led current

Hi,
On Thu, Dec 26, 2019 at 11:13:36AM +0100, Pavel Machek wrote:
> 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()?

Argh...i was sure i had that fixed (and tested without setting
led-max-microamp) but it was sitting on another branch. Thanks a lot for
catching that!
 -- Guido

> 
> With that fixed,
> 
> Acked-by: Pavel Machek <pavel@....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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ