Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp3209859ybe; Sun, 15 Sep 2019 09:58:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqx54gxDxpdNsrBd1PkrV1GNjhGKPscfvPRgCcbRK1IyVzgDGi4bfvku1/afQ/lLQvs9bjgi X-Received: by 2002:a50:ed17:: with SMTP id j23mr2257267eds.11.1568566719854; Sun, 15 Sep 2019 09:58:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568566719; cv=none; d=google.com; s=arc-20160816; b=P3hLMhraRtqbdlsB7HS0XVrZp8A134wasEfK8RrevJy5jbwta4DtWnOeP9tvDmRaxm DlV+jFk65JaSKy5JLCi+ls6NkXpemHlRaB/VILnWlpJife3BZAQib3FR5lbshWrBPW8k gV5PSvcjCPzS8qeuQrO459H5EO/hVkfLSQKlFaNE/aXFAg61rtumPKzbgeld5lxz0RUL FdVeFshzvmKmFZd6/AOwTvNnZnYtS6rb6taR8piNHKArxD7NuUp0zy7A8Ci5zjRtG/VM +bWoe2Qlma/cxlHclikmSiEGIscKmud/SuTiQeHt+ohl154DbmwNQD9UKN0B4CRnqVgr /psQ== 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; bh=rtA/609r3Ts4txtvNdqqJHvslIvHbceHgSpEHdjHRQc=; b=UgS863Ws1TsroTVjwGwv2MUnRwIcnMFQf5RaWtX8XT4nK5bTZiU51Q2/VNPa1nTR+z m/i54StNb8nlJWUtF7Vh7mQBDMQFpD3/eN7fQAvKQtSFbB0hPSc8tz9NETtBMaW7KMVI 4ixfnrnrehCVnLCoXs9ZAGO2a2FTowkuGZ1l0dORtR62R2piDPvQg/8/RaphjEWiHZ9T 5QxFa7tltX3RnEDoAA+Yn+rWLKgMdZYSMKY3YEZ8XhhLXXRKrUUjy2kKz4J74zpwguK5 r9IFcb2fJEQYRW4R12268xFtWLYKBBpMMc5Te3khH+TOhrlHcC606DrQPTBBwTYbNtbj PG8w== ARC-Authentication-Results: i=1; mx.google.com; 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 f2si6202390ejk.25.2019.09.15.09.58.16; Sun, 15 Sep 2019 09:58:39 -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; 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 S1726269AbfIOQwR (ORCPT + 99 others); Sun, 15 Sep 2019 12:52:17 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:54669 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725904AbfIOQwQ (ORCPT ); Sun, 15 Sep 2019 12:52:16 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 4AC6381DD1; Sun, 15 Sep 2019 18:51:59 +0200 (CEST) Date: Sun, 15 Sep 2019 18:52:04 +0200 From: Pavel Machek To: Andreas Kemnade 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: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190910210648.3594912d@kemnade.info> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html