Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp705925ybe; Wed, 11 Sep 2019 03:28:33 -0700 (PDT) X-Google-Smtp-Source: APXvYqyElfAJcGQgcdkITSSSWHFuOt9PzCbTlpoNPc/dmXz5lowTxzi0C1IrIDcGzL9CAfdbUzQR X-Received: by 2002:a50:fc94:: with SMTP id f20mr34598714edq.175.1568197713534; Wed, 11 Sep 2019 03:28:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568197713; cv=none; d=google.com; s=arc-20160816; b=Kwj8I3XF+cIT626dJ26RtiL0UOFSNSIVMrmnUKPd+tc1AQWQo3eR+5taubm9NvPTfl tPVBq3HrEh9g+pUdonKlfjKeIFJANY7Dcyc1mwva3DAdhC6bWp40zDTsB/3d7AO4D1rO weG7IRph9reOx1goyj1Rue6yLkyHJ/X55TGHV/a7OApJ/8PB4l/QguA+HgWRQfwqNMnN K3EG1zoYnCGJTEhLohUhwMhczTUmw6Wi9y/ire0qc6/7gjMpAmTub3wWS2cQF7mCzGNh ogeOuXoVLOMze2WNlArgJEVig8Bv+24bcABKnNshvGkA1iPQLnQmmTrez7XtvCfaSLhc sA4A== 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=cVytbu5aDeImYPKa8pGIMJDrGZ6PUWapgttWO1YNSWo=; b=b53KT7BtZC9tzyGfvq4xTYc81G279W67vCG1MRLgfl1ClVCKr/zEn1APkE9BlENtGm 4XWod6gAf237/4VI9YEMAgz1a+QqEkNlkW7VBjru5wQyQQvEE+eg67pqLp4Y1Vlx3kJ/ DRsHBolxWFAY/UpyW0Hv7cHR59VV1klf3UEY8E3XkGP93BqgAQePPfVXaXqZaqc7BVlH qXk7IrUU+31/eUYIC0OJ1P8boX67nPUjT28NneNVCdscIC5QnFEoTF5HEjN+pwTMsplR HdRo7tiszLe8EI5zhG7Ut8FNMJ3OvVvsj8j6LVj3vmI5XfBh018kdYeAvkXH3t3aEud0 tq4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WbGo5Hmz; 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 w27si12575084edd.84.2019.09.11.03.28.07; Wed, 11 Sep 2019 03:28:33 -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=WbGo5Hmz; 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 S1727695AbfIKKZi (ORCPT + 99 others); Wed, 11 Sep 2019 06:25:38 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:53927 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727677AbfIKKZh (ORCPT ); Wed, 11 Sep 2019 06:25:37 -0400 Received: by mail-wm1-f65.google.com with SMTP id q18so2776118wmq.3 for ; Wed, 11 Sep 2019 03:25:36 -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=cVytbu5aDeImYPKa8pGIMJDrGZ6PUWapgttWO1YNSWo=; b=WbGo5Hmz09242kK2X2Ks5uKjFCYXNT2i6lWaWWpoIN+qvvLyXoNLqTsd/1nDidIfV2 DQVN4B+puM2xskQIoKsxbaSQMlx9AiUrOLwVDieIgFbBoCitWqznFjicK88E/v9xXS3K BN25w/Fa6IfYNrZLdGgUIYPdCBhRgedhJ/2rGI2IPa0QIANFJ5kDHIWvhJOGlaWJb2aV w6whG54hVEfGCDgCh4JWZz3XIQN8XzZiMzmPQohhgPvGydLLkQGve+NqCWI7yeFo9olm CelxyfcqCEsPYLNMEvfPEQA+NH12WAoyHPk8tORRcyaFb0AOnBbf6TX6tapfMVeOj2to danw== 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=cVytbu5aDeImYPKa8pGIMJDrGZ6PUWapgttWO1YNSWo=; b=Mytmju4/IUwUlmeHOODvqaraV3lGSyuGfVkNT5+KxFAW8AgkxhvRCaDlKkFwqvfB8O Z78PfwwUjDcEV74gARyWBynspGe6P3Lq2svhuy+eWBAswAjUb1KqcM0DKBNac2vgJCNh WSSrrNchxDRtY69bE8gOYxRq4pvHtFEpWMqwrWVd21FtYd6TGxpaaGvMSEpHjK0TShUv viEPS38w7bv1i8e72HszPDPgtped8ARUoJDRizpcRqj3iFhVPQFXtEQY0401omzQYWEd USa8emukyfRLBGupBmJtSBZQJ7HNfpfiXlvSZ/NOcWHm5yzpdkYiy2LWGz9w+B5UaUG7 NmmA== X-Gm-Message-State: APjAAAWM3+IBN8xosRSrayEEOL+olEmu7Rld3KeLP3vNK6BF5RFVL44F 3ghNwFu2LH+KoQbiz8DYkSMdVA== X-Received: by 2002:a1c:f607:: with SMTP id w7mr3358169wmc.84.1568197535579; Wed, 11 Sep 2019 03:25:35 -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 e20sm2583505wme.3.2019.09.11.03.25.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2019 03:25:34 -0700 (PDT) Date: Wed, 11 Sep 2019 11:25:33 +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 v2 2/2] backlight: lm3630a: add an enable gpio for the HWEN pin Message-ID: <20190911102533.not4ta3xwgm6bhjo@holly.lan> References: <20190910212909.18095-1-andreas@kemnade.info> <20190910212909.18095-3-andreas@kemnade.info> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190910212909.18095-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 Tue, Sep 10, 2019 at 11:29:09PM +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 > --- > changes in v2: > - simplification > - correct gpio direction initialisation > > drivers/video/backlight/lm3630a_bl.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/video/backlight/lm3630a_bl.c b/drivers/video/backlight/lm3630a_bl.c > index 8f84f3684f04..9d0639d4202d 100644 > --- a/drivers/video/backlight/lm3630a_bl.c > +++ b/drivers/video/backlight/lm3630a_bl.c > @@ -12,6 +12,8 @@ > #include > #include > #include > +#include > +#include Nitpicking... but I don't think linux/gpio.h is used anymore. > #include > #include > > @@ -48,6 +50,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 +538,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 >