Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2104804ybe; Thu, 12 Sep 2019 04:43:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqxoUdZEZS6JDVjRQfTZJfaczN8vb/t3tiDsPRFm+vdAe3qSFPMrMtBsVlWPNRuHpXT4IjzZ X-Received: by 2002:a17:906:7c4e:: with SMTP id g14mr34507193ejp.103.1568288606565; Thu, 12 Sep 2019 04:43:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568288606; cv=none; d=google.com; s=arc-20160816; b=WyIurxHuYPL1qlAbDZ0u+zYZer4MsB5ougGYv/idnwbudiXq1GcKFmdQg51R7zIlsM qBXvPowqCVuAi+aaNuQQiWQIPq3CpEtGFGoCchh/4xGC5JBRz9DZNkpXqZmrdPvo3fyy EH5I4OHRcUvKUlpcFVEXnjjs2COjGiJHN63+hCOgoXAK09VRdSsGqw5WPYks0yV4usqv WX5g4l3GLArKEnyO5k3avVIF2vFyyu+OezY7s2nLOtA9Rftw/mvna6oC+LpyI4CQfprb P/E40Pu1wpqxGSA0JzUAOAHlgcosZ7SMCT+JPzZVf4ItU9SSjEv/+EntrjE6+yCFgJAw 3mPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=JAbUfkXS1yEg2PX6HE2Q/UJubwObycdqS5f0+MTrqI8=; b=vnQuEjg7kcs53MTKjziMTT/8mh+YOk6W+tKpG9Fpqa/UG1XH8eVciUH3A79m3979wr hb86328zksMPeoyLOZgCTZNnk6avVODVUj9ieLvPZBbapE19O62XxhVzADkQTX+OtEmo 9YO+KDNEn0qPZpNjobRw5BUazc0ntKAJ8GdNAl6mkk/z21TAWMEJp/OP9QNwhTetdGRf kvR6UaNQzVnXz+wFtS0kOscBM6xAzIHpcgTaG/LGlS5UXK8Ra+zPFP/SItyJxJ+Gnq0H jZ1/YmjgFSwyDpK7xVrDTunaqHFR1Y+CdGeJ4oiO8c5EgRnYiEexPlqs24AmDJC7/eQg 5GFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=wUS2FXnj; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l15si12621447ejc.100.2019.09.12.04.43.02; Thu, 12 Sep 2019 04:43:26 -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=@ti.com header.s=ti-com-17Q1 header.b=wUS2FXnj; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731459AbfILLko (ORCPT + 99 others); Thu, 12 Sep 2019 07:40:44 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:58868 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726952AbfILLko (ORCPT ); Thu, 12 Sep 2019 07:40:44 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x8CBePBm024620; Thu, 12 Sep 2019 06:40:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1568288425; bh=JAbUfkXS1yEg2PX6HE2Q/UJubwObycdqS5f0+MTrqI8=; h=Subject:To:References:From:Date:In-Reply-To; b=wUS2FXnjRMRb7nbux+n8VSR2S+QdV9Fa9p8pUDFqVPSwvbqhilzjFXWtVJlCnJesl oxX6owTH+yAb4R2D2Xn5kNI5aT5dvwiYKBMv1nvTt9VM+KVjf6tYnwkzQSs0R6XsVw r9mS2gdQ5iImyK6GMPxAN/Q5JPZMIG/GYLaCW6AI= Received: from DLEE101.ent.ti.com (dlee101.ent.ti.com [157.170.170.31]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8CBePTt013823 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 12 Sep 2019 06:40:25 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 12 Sep 2019 06:40:24 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE105.ent.ti.com (157.170.170.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 12 Sep 2019 06:40:24 -0500 Received: from [10.250.65.13] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8CBeOl4035179; Thu, 12 Sep 2019 06:40:24 -0500 Subject: Re: [PATCH v3 2/2] backlight: lm3630a: add an enable gpio for the HWEN pin To: Andreas Kemnade , , , , , , , , , , , , , , "H. Nikolaus Schaller" References: <20190911172106.12843-1-andreas@kemnade.info> <20190911172106.12843-3-andreas@kemnade.info> From: Dan Murphy Message-ID: <4b3407bb-d171-6a70-8252-573a4afbd056@ti.com> Date: Thu, 12 Sep 2019 06:40:24 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190911172106.12843-3-andreas@kemnade.info> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Andreas On 9/11/19 12:21 PM, 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 > > 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) { Thanks for the explanation It looks good to me Reviewed-by: Dan Murphy