Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933052AbbLXTg7 (ORCPT ); Thu, 24 Dec 2015 14:36:59 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:49501 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752480AbbLXTgl (ORCPT ); Thu, 24 Dec 2015 14:36:41 -0500 Date: Thu, 24 Dec 2015 19:35:38 +0000 From: Mark Brown To: Paul Kocialkowski Cc: 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 , Milo Kim , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Message-ID: <20151224193538.GJ579@sirena.org.uk> References: <1450868319-20513-1-git-send-email-contact@paulk.fr> <1450868319-20513-5-git-send-email-contact@paulk.fr> <20151223115632.GS16023@sirena.org.uk> <1450980773.11913.3.camel@collins> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="va4/JQ6j8/8uipEp" Content-Disposition: inline In-Reply-To: <1450980773.11913.3.camel@collins> X-Cookie: System checkpoint complete. User-Agent: Mutt/1.5.24 (2015-08-30) X-SA-Exim-Connect-IP: 86.157.189.212 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: 2172 Lines: 52 --va4/JQ6j8/8uipEp Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 24, 2015 at 07:12:53PM +0100, Paul Kocialkowski wrote: > Le mercredi 23 d=E9cembre 2015 =E0 11:56 +0000, Mark Brown a =E9crit : > > This isn't really adding support for the enable GPIO as the changelog > > suggests, it's requesting but not managing the GPIO. Since there is > > core support for manging enable GPIOs this seems especially silly, > > please tell the core about the GPIO and then it will work at runtime > > too. > It looks like the core bindings for GPIO can only be used instead of the > rdev->desc->ops->enable callback, not jointly, which doesn't fit my use > case, where both the GPIO and register write have to be used to enable > regulators. > I think it would be worth making it possible to use both in core, since > that situation is probably shared with other regulators. I suggest the > following diff (that would be split into a separate patch in v2 of this > series): No, that's broken - the whole point with using a GPIO for enable control on a lot of devices is that it is much faster than doing a register write. What I would expect to happen in this case is that when initialsing the GPIO we set the register to enabled and then only manage the GPIO at runtime. --va4/JQ6j8/8uipEp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWfEkIAAoJECTWi3JdVIfQ3AsH/jeYLGM1bJ/BheObxioiiFmz ErauD/7BFjliYshyg37vN036iB8W1/bsw606ibtuylAJpG3ruWe0ygzoLCnANBux KudQw1GiBdVGf4aaqXMR9yl3dZzvER9xNYoglBAu5k9CiJg19LWgzjmnPbMJz8cD T+eRY9xZ/czrcqrYpBgU746fRRVmGrjNWeFh7SUSAsfcRVG84ZZBwm9zBC0mqBf7 M4eLq4/Lc+XT2fYsE9D/hsWREAPqCPVN2sHuxRDHK87032HOz9ZJhuk+FW/DXWoz SSryF/KVeODQa5TeEwcj/ovKehytNr6tNf+kmHnmfQDIYXRImLJqzxst3eXv5Rw= =3L9B -----END PGP SIGNATURE----- --va4/JQ6j8/8uipEp-- -- 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/