Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1987983ybe; Thu, 12 Sep 2019 02:43:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqx17kyrf1DgJdbHQUmQPXeYNpuM1Rz5QC+AURFHFZuOn0eqtA67S9WMUz+Bm+uS2E/Fa0UP X-Received: by 2002:a17:906:7c4e:: with SMTP id g14mr34082920ejp.103.1568281431135; Thu, 12 Sep 2019 02:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568281431; cv=none; d=google.com; s=arc-20160816; b=ipTGw2fElg8Awhv1MTYIq1WT9HRa59YIMUwuOrP83X3ayY8lPYG5VUs7LdME76Ap7h 9AlxcjDkyB91Z4mV2/aP2WlUPYSZAG74sFNIjdazJfFCfNxAmes3xaJwE6zQEmRiptjt zmNXqoWWNvsN9veYV/cIbslMjBRopkTmpfzNvmKF7GWNUF5SUwi6GRhR/5JSTo8jywrG CGAuFaDFl2j9v3lcEUCz5NaDRHJ+8aNaQDFdkoHQUR86QYaAvqS2sKP958mJh0ig90uq KUCt6IYdncJv7VjXpUSDnJ4CZChn5+c0FklOarvZSN6i3dUBYQ12597PHdihudQ6JGPT 2stQ== 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:dkim-signature; bh=FyZv+2jpXHUeLj3zo5hEMKDZeE0gwZkeevJP1UY0f7g=; b=WNJdKIdpSYmwim7aYw8R4dJzcQlAdK3soEKwSbTgmxRw4NLhZkW0RyOMon05wJH+pt Bi6msyUt6jPGHV5z+SR18rGDY8Kpv6EGIc7S0T7dr0qzgPSIdQg6a9mh1pf8gw83WTBW jql86sZNmiHZ8tEzSBsDrxPSfrdL/gn+v9lvEPBVac5bbUAN1CjEDECqIr7qS2tp225X b5zKlaowin8QhIxxXeh8njYlAGdoorROOhZIJ7rr2lIJcido5dLcNv9+h1d4K6EE7Ml0 H3C+zDNub0ONhw4Z0w6ZnD99r5hjYaINswnCSixBJPzNyhsIksM3YBT2xanRCP/raHvD +KyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ecsVnCqf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s1si15493741edd.112.2019.09.12.02.43.27; Thu, 12 Sep 2019 02:43:51 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=ecsVnCqf; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730805AbfILJi2 (ORCPT + 99 others); Thu, 12 Sep 2019 05:38:28 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:40687 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730237AbfILJi2 (ORCPT ); Thu, 12 Sep 2019 05:38:28 -0400 Received: by mail-wm1-f65.google.com with SMTP id m3so2906398wmc.5 for ; Thu, 12 Sep 2019 02:38:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=FyZv+2jpXHUeLj3zo5hEMKDZeE0gwZkeevJP1UY0f7g=; b=ecsVnCqf7jy234ajtjhPg9bUFq6eqgeSiFQ3B9VshYDzlqTvwe6qHgo3Rme+YYjBYq 57zpk4CVJaSffFdPd270c0VN8xlStEbZJZ+Sqs9lpMMOoBBIxWcWmnuTRQRez1qiHG0d 1lF/Ub0lLFF61mcsJSmPRk+pkj9XHPLqMlmxv7g+hUhnOhPZJw3sqdIw0H0sRO6Szluy uubJNNNO3gpZ0uIIEthnKcGjYVCyroZ5Acc8NukHDVwgHn57hKBRTPjMeKVcjOYEpRX9 joNJftMwDDaAtTVKc4vY8Ukzbw1p4oew/FyaHhwm6kEX+/WIUZzjHq3A1AVFc9G0i9jV +qUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=FyZv+2jpXHUeLj3zo5hEMKDZeE0gwZkeevJP1UY0f7g=; b=NmqXODaEAmT3AJkogSn9n2Esfv9iBWhArSwrFpDIvagaN96OiK40pJYM2KirRjih8C zdCDwS/fGDN3Maajjpe9Nu8bxRBHI8eavI/Z9qqE1vVIMcBIUMtUqEVe40yMOAcZyFvB EDt8mmiU3VrsyVJiKWPpPbCwnaW0kV+ZfX0ZonCOMAzZfJrtruNcndmgv6Kq0q+VM8Oe oNCAVHYyiiB3X29JDUuRqQbo31kSzZie9KhmLvymLsVWoT24wIhfkGd1PzCWkiA7btZA G3zALPlQSc8rJRVboffGob31HDOZzm10Kl6fLMyZCZbH5jTpWcaRhI3FRP7kasTy0h15 TVmA== X-Gm-Message-State: APjAAAVcAfuB4ExBBFw1EPNW31Yn0EVy6auQYeQgIs6KLvmZAwkGiBAM iohA1ZVoSx9dehiKk5EkAAoRrA== X-Received: by 2002:a05:600c:2386:: with SMTP id m6mr1662719wma.164.1568281106577; Thu, 12 Sep 2019 02:38:26 -0700 (PDT) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id s26sm43063574wrs.63.2019.09.12.02.38.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Sep 2019 02:38:25 -0700 (PDT) Date: Thu, 12 Sep 2019 10:38:23 +0100 From: Daniel Thompson To: Andreas Kemnade Cc: lee.jones@linaro.org, jingoohan1@gmail.com, jacek.anaszewski@gmail.com, pavel@ucw.cz, dmurphy@ti.com, robh+dt@kernel.org, mark.rutland@arm.com, b.zolnierkie@samsung.com, dri-devel@lists.freedesktop.org, linux-leds@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, "H. Nikolaus Schaller" Subject: Re: [PATCH v3 2/2] backlight: lm3630a: add an enable gpio for the HWEN pin Message-ID: <20190912093823.h5ahzutlp4evwg6l@holly.lan> References: <20190911172106.12843-1-andreas@kemnade.info> <20190911172106.12843-3-andreas@kemnade.info> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190911172106.12843-3-andreas@kemnade.info> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 11, 2019 at 07:21:06PM +0200, Andreas Kemnade wrote: > For now just enable it in the probe function to allow i2c > access. Disabling also means resetting the register values > to default and according to the datasheet does not give > power savings. > > Tested on Kobo Clara HD. > > Signed-off-by: Andreas Kemnade Make sure Dan is happy w.r.t. his review comments but if this driver is unchanged when you spin v4 (for the DT changes) then feel free to add: Reviewed-by: Daniel Thompson Daniel. > --- > changes in v2: > - simplification > - correct gpio direction initialisation > > changes in v3: > - removed legacy include > > drivers/video/backlight/lm3630a_bl.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c > index 8f84f3684f04..d9e67b9b2571 100644 > --- a/drivers/video/backlight/lm3630a_bl.c > +++ b/drivers/video/backlight/lm3630a_bl.c > @@ -12,6 +12,7 @@ > #include > #include > #include > +#include > #include > #include > > @@ -48,6 +49,7 @@ struct lm3630a_chip { > struct lm3630a_platform_data *pdata; > struct backlight_device *bleda; > struct backlight_device *bledb; > + struct gpio_desc *enable_gpio; > struct regmap *regmap; > struct pwm_device *pwmd; > }; > @@ -535,6 +537,13 @@ static int lm3630a_probe(struct i2c_client *client, > } > pchip->pdata = pdata; > > + pchip->enable_gpio = devm_gpiod_get_optional(&client->dev, "enable", > + GPIOD_OUT_HIGH); > + if (IS_ERR(pchip->enable_gpio)) { > + rval = PTR_ERR(pchip->enable_gpio); > + return rval; > + } > + > /* chip initialize */ > rval = lm3630a_chip_init(pchip); > if (rval < 0) { > -- > 2.20.1 >