Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3324307ybe; Sun, 15 Sep 2019 12:41:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqyCWDYwPb0xfclwwi6Px8+qUXgfORzX+hDHE5pBjgAT3ddVTmrxKmPGfdhjXE3IKa9VREKJ X-Received: by 2002:aa7:ccc3:: with SMTP id y3mr57243321edt.1.1568576474408; Sun, 15 Sep 2019 12:41:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568576474; cv=none; d=google.com; s=arc-20160816; b=tiKXNy5sWmKSflN6ABcgexJE7aS8jqMRM5RAnhFvHFSh4OWWLrHJdUxxYcAIqPENd8 cOYUFbottVJykcBfymzNIjABRGcEz6Hn9gYNxzHloiq24zqAqk95Dv/Dd3W3Sh+lTVr9 xbzyG4fBf7Yo8Xs1ycoSnRgMBXgIIofCi6CUi0rplGCFYuCV1AQFJZOTGCWeQwSLYfiR 71vWifyPjMgbAXckilq0uMmyI/zWLPOV9HW5hZJT8MF/MZ3zLG7aP9HNmX9XP87p/QzW M/jWRIX87xFz/y7HQjcKXXSwAuvEbWw1wfcAkm8LZDpbB+cUoD7gxnWcrnuidaJY+Gtd dikg== 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=RH3Ef5d/v7AONt/7OCwGtfOGl/ZPOxk/BNLO7+WUrvc=; b=yw22UCjwp7kMtqSo7Eas5qe/WduhJvJsZOxJ//maLKhTe+wHcqx3W+pOWU6KqbwFdq nxCc4fqKEjkOxprTkoKjOjxO071ncISGYPxku9tztYa1jZ/c1RxE7gG05pMYXBdCr5AZ JSpSaFacKcYC1ycD59wNYPuZBrM+lrleOYzPfGvnNk6C4Cf/W6FT+dw3pJtf/w2GccDv 4xjmVPAx9fTK5p5ZXNHOaTKfzG5WKThpg2XEOH0eBhtqDutFEyK40L6Dq0IaUu3ljHCT ha4cRo30GUGepZiePSL2Ep1xK1fd0J5v5xJVUK3IH1iD/fceMol113o8gk1rDkfl3k7l U6Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=AuCxOItx; 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 d17si21437409eda.213.2019.09.15.12.40.51; Sun, 15 Sep 2019 12:41:14 -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=AuCxOItx; 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 S1727778AbfIORep (ORCPT + 99 others); Sun, 15 Sep 2019 13:34:45 -0400 Received: from mail.andi.de1.cc ([85.214.55.253]:45134 "EHLO mail.andi.de1.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727140AbfIORep (ORCPT ); Sun, 15 Sep 2019 13:34:45 -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=RH3Ef5d/v7AONt/7OCwGtfOGl/ZPOxk/BNLO7+WUrvc=; b=AuCxOItxAXXy3fGbF9/x8IzmSv tGCuMHC05jD9iNfKoMUQAl2DaePaOtKeIV2WoW4pKb9DOiNSCpZGbLl6lEiZPYmbJ53XsWH/0niWw /PlR7DJNY3//d+JYjmNl5bFRFeDib33HA0PqO6TzET64gY137rJbQ53i/585fHhMSLK4=; Received: from p200300ccff4ebd001a3da2fffebfd33a.dip0.t-ipconnect.de ([2003:cc:ff4e:bd00: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 1i9YPu-0006G5-NN; Sun, 15 Sep 2019 19:34:31 +0200 Date: Sun, 15 Sep 2019 19:34:29 +0200 From: Andreas Kemnade To: Pavel Machek Cc: Daniel Thompson , lee.jones@linaro.org, jingoohan1@gmail.com, jacek.anaszewski@gmail.com, 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 1/2] backlight: lm3630a: add an enable gpio for the HWEN pin Message-ID: <20190915193429.5feef312@aktux> In-Reply-To: <20190915165204.GA4857@bug> References: <20190908203704.30147-1-andreas@kemnade.info> <20190908203704.30147-2-andreas@kemnade.info> <20190909105729.w5552rtop7rhghy2@holly.lan> <20190909221349.46ca5a1f@aktux> <20190910102156.vmprsjebmlphkv34@holly.lan> <20190910210648.3594912d@kemnade.info> <20190915165204.GA4857@bug> 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=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 (-) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Sun, 15 Sep 2019 18:52:04 +0200 Pavel Machek wrote: > Hi! > > > > > > Is this needed? > > > > > > > > > > This is a remove path, not a power management path, and we have no idea > > > > > what the original status of the pin was anyway? > > > > > > > > > > > > > Looking at Ishdn on page 5 of the datasheet, switching it off everytime > > > > possible seems not needed. We would need to call chip_init() everytime > > > > we enable the gpio or live with default values. > > > > Therefore I did decide to not put it into any power management path. > > > > But switching it on and not switching it off feels so unbalanced. > > > > > > Either the power consumed by the controller when strings aren't lit up > > > matters, in which case the driver should implement proper power > > > management or it doesn't matter and changing the pin state isn't needed. > > > > > > I'm happy with either of the above but this looks like a third way, > > > where eager users could hack in a bit of extra power management by > > > forcing drivers to unbind. > > > > > I think I will take the simple way. I am quite sure that the power > > consumption with HWEN on and leds off does not matter. If someone > > later comes up and finds out that I misread the datasheet, things > > are prepared to be improved. > > Dunno.. if the power consumption does not matter, why does the chip have the enable > pin in the first place, and why do we bother supporting it? We could hardcode the > pin to enabled as well.. Well, I agree having the pin and no power saving seems not to make sense. Two points here: I think it is a good idea to properly describe the hardware in the devicetree. What to do with that information is another thing. A problem is that at the moment I cannot easily measure consumption of the chip. Hmm, even testing a solution which disables the pin while the chip is not in use, is not so easy. But wait... I could use a wrong gpio but one that I can easily monitor to check if the pin is toggled. And set the real pin to high by some other means. And then use the real gpio to check if timings are correct (waiting enough after enabling the chip, e.g. Regards, Andreas