Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9612005ybl; Thu, 26 Dec 2019 02:14:29 -0800 (PST) X-Google-Smtp-Source: APXvYqyYrAIClFYbrSl66rD0HOyiDZiQ1Z4CjAnLU6o+zD7OBpCN9G6TzyZLQCUpHfuTJDZfqTdn X-Received: by 2002:a05:6830:1185:: with SMTP id u5mr46479170otq.147.1577355269028; Thu, 26 Dec 2019 02:14:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577355269; cv=none; d=google.com; s=arc-20160816; b=d89250r2MZEsM5h6qWWZ65iG8g+gyHN5Kcj+bqXZkJ6ixkJgcNAnXlNCk3/h5FnUmA JCW4U+tXlFa3DglE2JijMFmzaYtOv/2uHkhXh/JgmUFjuzZoJ9Sa50XyEsIgsJ5NQJAC 4WYooDkn10iSx3ae9KyVIrj4QArw0OiwRlIxKpOnhcusN4MYvay3hCWVP7kFuiNlJWZz pYUCE4Ihu0l0ofNxNWRD7vqH+V8c7g/OlPDCvsE+4BAUbRhi3HasqglkktcwUa5S6IV3 NE+b0l4wJQ0gEx7gwxlR69LeGkvijta0cQdp5gXQ3cFkuBT+0v3mjAOfgqWzdk4owkvl xzOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=8FlFJyk+8uSvaub3g1ObLwrXQr1BWMJyFEgSG8P0iA4=; b=QM17fdc4ZK9YPaP5F2fXYlAOmO/FurRzC7ScXunbZIM7KADZ373PhrLwtlLKFOMKkC IZ+6TNNZZYAbgAxiI4rikpIkfaLnxhuNRz/QM7hm6cWw6Vze1m4B8mHxl/HxfRF5Nlum CXud8wDfWNUhoB78c7rr/yn7FTMmw2ck6ztpMqP0NFQFYE64wy9uDPaaYdbGYQZFJkiu 98mib0mjGY+dGcldf4DVFWuaF1HoW/bja4lVS3ANFcaSXaw96bf82JEIkM5vhlDwUBWx QVA5otVpAZcqNsACrCRZS9tdnFCRgfcdjJiCFRWN48qG5dyWrYJ/OfvZmcADCoINfLf7 SY8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l3si11648664otq.40.2019.12.26.02.14.17; Thu, 26 Dec 2019 02:14:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726575AbfLZKNj (ORCPT + 99 others); Thu, 26 Dec 2019 05:13:39 -0500 Received: from jabberwock.ucw.cz ([46.255.230.98]:42454 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726023AbfLZKNj (ORCPT ); Thu, 26 Dec 2019 05:13:39 -0500 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 7E8E81C213B; Thu, 26 Dec 2019 11:13:37 +0100 (CET) Date: Thu, 26 Dec 2019 11:13:36 +0100 From: Pavel Machek To: Guido =?iso-8859-1?Q?G=FCnther?= Cc: Jacek Anaszewski , Dan Murphy , Rob Herring , Mark Rutland , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 6/6] leds: lm3692x: Make sure we don't exceed the maximum led current Message-ID: <20191226101336.GD4033@amd> References: <96dad031f3a9ff5bbc311d0ec8768b348b996bcf.1577271823.git.agx@sigxcpu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="tEFtbjk+mNEviIIX" Content-Disposition: inline In-Reply-To: <96dad031f3a9ff5bbc311d0ec8768b348b996bcf.1577271823.git.agx@sigxcpu.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --tEFtbjk+mNEviIIX Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed 2019-12-25 12:07:19, Guido G=FCnther 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. >=20 > 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 =3D NULL; > struct led_init_data init_data =3D {}; > - u32 ovp; > + u32 ovp, max_cur; > bool exp_mode; > int ret; > =20 > @@ -397,6 +416,10 @@ static int lm3692x_probe_dt(struct lm3692x_led *led) > return ret; > } > =20 > + fwnode_property_read_u32(child, "led-max-microamp", &max_cur); > + led->led_dev.max_brightness =3D 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 (Feel free to wait for Rob before resending the series, and I guess you can merge it with the next one). Best regards, Pavel --=20 (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blo= g.html --tEFtbjk+mNEviIIX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl4Eh9AACgkQMOfwapXb+vIglQCeMrwe/Mmp0WlahYYTtwHfe8sG OTMAmwfEU5NP/YUQIzgkfjiT8CLprnMZ =3xmI -----END PGP SIGNATURE----- --tEFtbjk+mNEviIIX--