From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932869AbbCDL1d (ORCPT ); Wed, 4 Mar 2015 06:27:33 -0500 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:49277 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758212AbbCDL1a (ORCPT ); Wed, 4 Mar 2015 06:27:30 -0500 Date: Wed, 4 Mar 2015 11:27:12 +0000 From: Mark Brown To: Doug Anderson Cc: milo.kim@ti.com, Axel Lin , Dmitry Torokhov , Olof Johansson , Javier Martinez Canillas , Paul Stewart , "stable@vger.kernel.org" , Liam Girdwood , "linux-kernel@vger.kernel.org" Message-ID: <20150304112712.GI21293@sirena.org.uk> References: <1425066064-18920-1-git-send-email-dianders@chromium.org> <20150302184722.GE21293@sirena.org.uk> <20150303142311.GT21293@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="zlzV+hDmh2YCuG4x" Content-Disposition: inline In-Reply-To: X-Cookie: My LESLIE GORE record is BROKEN ... User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [PATCH] regulator: core: Fix enable GPIO reference counting 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 --zlzV+hDmh2YCuG4x Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Mar 03, 2015 at 03:21:21PM -0800, Doug Anderson wrote: > It looks as if "ena_gpio_state" is not quite what I thought it was and > I think is not actually consistent in the regulator framework itself. > In _regulator_do_enable() and _regulator_do_disable() is clear that > ena_gpio_state is 1 when an "rdev" is enabled and 0 when the "rdev" is > disabled. That was my assumption. It's also clear in > _regulator_is_enabled(). > ...but then I looked in regulator_register(). There you can see that > ena_gpio_state could be set to 1 if you've got an active low GPIO that > is disabled at boot. That totally throws my logic for a loop. Also > with my patch the reference counting will be all messed up for active > high / boot on regulators. :( Isn't that just a bug in the registration code? I'd not be entirely surprised if that were the case. --zlzV+hDmh2YCuG4x Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJU9uwPAAoJECTWi3JdVIfQLc0H/j7+IekuTFtUj+PXrrj0xpbe uijttca0VN0hUFcVN5oy+03sb08INCfxNi7AcxIJZAnf/Cl8REjdBa/q9vXHHQ7B v/1MNd3U6odU/HZ9sej8O2lsZX6G091yMNTOqHkEWwzFQjePfXsvgmPcSK9/+2Tb D7xEZH4Fn+43131xN6x8kY+OS4scVl4buxab6b0CWrQAFv4RQSTlJMSQp6CzdrhG d1km7jWNwpl1OQ/ZFg7VCyXbEis29qKwtDQqlP5ma4+1lggMOFIDtwkH5i3aFyxK JW5sJZr2fJ+D+rJVNpF2QLu8KFVaY750OPiXDbjqM2F8zQ2v+wwHcFs9oBxj7mU= =SU4g -----END PGP SIGNATURE----- --zlzV+hDmh2YCuG4x--