Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp1448960ybe; Wed, 11 Sep 2019 15:24:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqz+Id9/PVIqfZf2NSHDgTHMy2ejmNRgIfm21kiKGMcStfkMqCtqj4P37ieJWM6vSlcgFRHV X-Received: by 2002:a17:906:f0c9:: with SMTP id dk9mr31603191ejb.261.1568240675305; Wed, 11 Sep 2019 15:24:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568240675; cv=none; d=google.com; s=arc-20160816; b=Ro8Fo049nDzBlToJ6XuUTPm5DTPhPiS91OB88OUn4vHAKxuD9qL+kDfaX6XJmgCE8H VO22qMdxxA0W1a3KyYfAne7ptaOZ84PYsAJ9NEujjHet9ylzw5X1GV2ZlF7SawvSalbq AjCaBqN9xuTslsJBstRiKtCxetFoy7vsTSP4KTtYNys3iJ7gsSvKwBZFa3cx72wPy4FB GDhJkOzs0Bh3WO+oeth8uLwYzD7AHeXu+WtABOO1r8VcANTA2cldc48k6eegiRE3bpkr 9tzR/CjUyULPigI6wbrGhZ/r4A4wjUSlsoe58+k0IudbysB+TTL1/fpoJW2quK7RuDz/ QQ9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=KHbCcZ8BvWWbKPSh5z+H7SgPQzQ4ifBlCer1pX9BQL0=; b=TL8+h33lAYewI8ULqgLEm7WqoUKqj7XAl8pS58+jduKHMehj636e8Q7SUYEXMPJfKk fMBau0aJdlY1QXFDX6ImJaH2TfnMBEhaCGSb3uDUaivbaHQzCBCXX0Gc8KrMIdICiRQx kRQ26n0JRwxY00xdJ7VFRMUlCd5VTygbx9MojYdrlXrW0dqzVFHXEERI7bLUViHPqa39 M31EDY7FMNZ2g51tPsoLL0NXM9SK7w+9VvQgQqsB8WS/9kr0cUs1kiC/lEWFnzNb1wrC ZjTzj5bnFGQXqRhv/eluLtqATGxK5N+6uUONnjJeJfy13adqWAWYOL2jdoq0w2L9EP+m ZGGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=hf05DHew; 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 re7si11884824ejb.349.2019.09.11.15.24.11; Wed, 11 Sep 2019 15:24:35 -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=fail header.i=@kemnade.info header.s=20180802 header.b=hf05DHew; 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 S1730514AbfIKUZ1 (ORCPT + 99 others); Wed, 11 Sep 2019 16:25:27 -0400 Received: from mail.andi.de1.cc ([85.214.55.253]:35838 "EHLO mail.andi.de1.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729054AbfIKUZ1 (ORCPT ); Wed, 11 Sep 2019 16:25:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20180802; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=KHbCcZ8BvWWbKPSh5z+H7SgPQzQ4ifBlCer1pX9BQL0=; b=hf05DHewho7GMIGCsH6/PGeoio TGv5pVTLJKtBGYQuR9O23JhXG5QQBFQf0V2+KLqVOFIomAerLdkInBvA12Nh22VovQPgot39NQJJF 064uTu5vshQfNEAFAkSfKJs+GTMkN5eWl7TkiwuP9es2KdReiUOZjp8+XSaY1uEhNT6s=; Received: from p200300ccff0b59001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff0b:5900:1a3d:a2ff:febf:d33a] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1i89Aw-0003L7-B7; Wed, 11 Sep 2019 22:25:14 +0200 Date: Wed, 11 Sep 2019 22:25:13 +0200 From: Andreas Kemnade To: Dan Murphy Cc: Daniel Thompson , , , , , , , , , , , , , "H. Nikolaus Schaller" Subject: Re: [PATCH v2 2/2] backlight: lm3630a: add an enable gpio for the HWEN pin Message-ID: <20190911222513.489b5235@aktux> In-Reply-To: References: <20190910212909.18095-1-andreas@kemnade.info> <20190910212909.18095-3-andreas@kemnade.info> <20190911102533.not4ta3xwgm6bhjo@holly.lan> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.0 (-) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 11 Sep 2019 13:48:36 -0500 Dan Murphy wrote: > >> @@ -535,6 +538,13 @@ static int lm3630a_probe(struct i2c_client *clien= t, > >> } > >> pchip->pdata =3D pdata; > >> =20 > >> + pchip->enable_gpio =3D devm_gpiod_get_optional(&client->dev, "enable= ", > >> + GPIOD_OUT_HIGH); > >> + if (IS_ERR(pchip->enable_gpio)) { > >> + rval =3D PTR_ERR(pchip->enable_gpio); > >> + return rval; =20 >=20 > the enable gpio is optional so if it fails you log the error and move on > well, if the gpio is not there, then it returns NULL. It might return e.g. -EDEFER. So I need to check for errors here. =20 > Also on driver removal did you want to set the GPIO to low to disable=20 > the device to save power? >=20 page 5 of the datasheet says: Ishdn =3D Typ. 1=C2=B5A max. 4=C2=B5A. For HWEN=3DVin, I2c shutdown (I guess this means outputs powered off) ond for HWEN=3DGND. So are we really saving something here? Regards, Andreas