Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp10938187ybl; Fri, 27 Dec 2019 05:00:41 -0800 (PST) X-Google-Smtp-Source: APXvYqw5wYOwHp0hrnPdgIvgG/iUaWbvK9XzBL949JLn00cx9mVMJCWCIPyjm9IYhkybTif+ULnU X-Received: by 2002:a9d:7b4e:: with SMTP id f14mr57798471oto.355.1577451641143; Fri, 27 Dec 2019 05:00:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577451641; cv=none; d=google.com; s=arc-20160816; b=HG7hJHC6M35FKfYPKj8bKd2ryZxXZTB0CuZ0CUTPZcyHvyphbbSL6wIikPfvEvCGEm VLMS8cQ0zP4tlOAJL+/lUiYZb9duiRMZ8b14ASJlUzSR2m22vqZByB9xUXmfiTa8ANFt Bu4Dk1gEuFVRHtCB52Q50yZJFL+QHd9wPVHCMlmpAnBMU8tFFgNK1y1Q+WnlYFtikjbK hfxY6LqfJZquf0pB3ugd4BeaOJeHX9+ndB+wBw7zYLpnMgiY492GqYAQvV0rBQiBGxPW St99dIc4u6gf+n6YelzaGnekGFOZenWKF+eqwS+3eFxw9ibb8JLH6YZQmTmw19WSFCy2 zhSw== 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-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=9iMNKU8k3x38SwqQMAUGAf/jfD6dLo4wQj/aBqWpY6E=; b=bRP2uq/eegQXPxicL5YEGx++rE9OEk9roPxWFZIltPFqASgEpDL1+n8ZqButRVK3kb IdiQtNzNFVRqzAg32hmkIfqCrbYWZmAZtRgOhf1kH4QEIMz9BwYxXpHAKmxziTbllChC qON94VsOY1Kg1IjwdYGmLAbxm2h29oM+IcN5aqnQJcrvOYqkxna79hP+9ReXUY7D547a ny4O/Pq1oV3WqPvErrfif7Clp0OnJhIUBR0ZUu6bHwLpOoCf19v4hZGzEm/UD3AdFzBv 4x+hzVHwX9tcIPrsel/nK3Mt18/29Om0xo5ziX0BS3NoIMxbezWRDQApIuCe8Vhh3cTt Lg9Q== 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 d20si13168373oic.40.2019.12.27.05.00.27; Fri, 27 Dec 2019 05:00:41 -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 S1727002AbfL0M7p (ORCPT + 99 others); Fri, 27 Dec 2019 07:59:45 -0500 Received: from honk.sigxcpu.org ([24.134.29.49]:33310 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726377AbfL0M7p (ORCPT ); Fri, 27 Dec 2019 07:59:45 -0500 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 59BE2FB03; Fri, 27 Dec 2019 13:59:42 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R0-rgRbwKwjQ; Fri, 27 Dec 2019 13:59:40 +0100 (CET) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id C688E49799; Fri, 27 Dec 2019 13:59:39 +0100 (CET) Date: Fri, 27 Dec 2019 13:59:39 +0100 From: Guido =?iso-8859-1?Q?G=FCnther?= To: Pavel Machek 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: <20191227125939.GA26392@bogon.m.sigxcpu.org> References: <96dad031f3a9ff5bbc311d0ec8768b348b996bcf.1577271823.git.agx@sigxcpu.org> <20191226101336.GD4033@amd> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191226101336.GD4033@amd> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > (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