Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752545AbbLaVvO (ORCPT ); Thu, 31 Dec 2015 16:51:14 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:57868 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751619AbbLaVvK (ORCPT ); Thu, 31 Dec 2015 16:51:10 -0500 Date: Thu, 31 Dec 2015 21:40:07 +0000 From: Mark Brown To: Paul Kocialkowski Cc: Milo Kim , linux-kernel@vger.kernel.org, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , =?iso-8859-1?Q?Beno=EEt?= Cousson , Tony Lindgren , Liam Girdwood , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Message-ID: <20151231214007.GC16023@sirena.org.uk> References: <1450868319-20513-5-git-send-email-contact@paulk.fr> <20151223115632.GS16023@sirena.org.uk> <568088B4.6090207@ti.com> <1451342963.14631.13.camel@collins> <5681D7A8.2030101@ti.com> <1451387613.18148.9.camel@collins> <568323B7.7080101@ti.com> <1451464521.2531.4.camel@collins> <20151230163307.GW16023@sirena.org.uk> <1451500639.14341.6.camel@collins> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Ro1PRY3Rtw8g7IwX" Content-Disposition: inline In-Reply-To: <1451500639.14341.6.camel@collins> X-Cookie: Honk if you love peace and quiet. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 2a01:348:6:808::2 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH 4/6] regulator: lp872x: Add enable GPIO pin support X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2470 Lines: 57 --Ro1PRY3Rtw8g7IwX Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Dec 30, 2015 at 07:37:19PM +0100, Paul Kocialkowski wrote: > Le mercredi 30 d=E9cembre 2015 =E0 16:33 +0000, Mark Brown a =E9crit : > > On Wed, Dec 30, 2015 at 09:35:21AM +0100, Paul Kocialkowski wrote: > > > In my opinion, it would be more elegant to adapt the core regulator > > > framework to first enable the GPIO and then call the regulator enable > > > ops callback instead of handling the GPIO in the driver. > > Why would we want to actively manage both things at runtime? It's more > > work, what do we gain from it? > Well, I figured that it would be best to disable the EN pin when we're > not using any of the regulators, since that allows the chip to enter > standby mode (and thus consume less power). This doesn't sound like it's anything to do with the regulators, that's a chip wide power management function which should be implemented via runtime PM if there's any value in implementing it at all (if the device is a primary PMIC normally this would be handled by the CPU core when it enters low power state without any software). It's not something we should be considering on a per regulator basis since it's at the chip level and on a per regulator basis it's not doing anything useful for the reasons above. > It also doesn't hurt regulators that only use a GPIO for enable. It causes problems for any device with an optional GPIO, it means that we end up mantaining both GPIO and register which as I've said a couple of times now defeats the point of having the GPIO. --Ro1PRY3Rtw8g7IwX Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWhaC3AAoJECTWi3JdVIfQDb4H/AlSsd6XLfq9Otsz4axkNChr /7EKdNYcYk2bYTCorbUgPFH8g33n2kv/z3Q5HgFdIVR+vztG2h15qaIdEXEak/KM Ve4hBbQYgULkbcIPJYuL1MRhRCCRrpfBm+fRlWnrcWbrD639wSfNQ+qdt1AwTQl8 EZfYYeWpQBq4dApObt/bbZLyOm+RlhLmjHy/UKZNcka/v3CKKKsmVvE0UL9STGXC uOx97/owgDyxoSAFWA1eYcN1cSDwruwLU4woG/TQ9vgOj2KDiBCt9fFnxapDjVj+ Ny5v9C12moxprpjfmt/Lgq3kaZ6PApaTs4QemCOvzcnaax99JWloL4zNEVME2Uk= =5n9K -----END PGP SIGNATURE----- --Ro1PRY3Rtw8g7IwX-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/