From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752786AbbCKK55 (ORCPT ); Wed, 11 Mar 2015 06:57:57 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:35634 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752250AbbCKK5z (ORCPT ); Wed, 11 Mar 2015 06:57:55 -0400 Date: Wed, 11 Mar 2015 10:57:44 +0000 From: Mark Brown To: Javier Martinez Canillas Cc: Doug Anderson , Liam Girdwood , "linux-kernel@vger.kernel.org" Message-ID: <20150311105744.GX28806@sirena.org.uk> References: <1425328839-28330-1-git-send-email-javier.martinez@collabora.co.uk> <54F60602.3030505@collabora.co.uk> <54F70C5C.4080201@collabora.co.uk> <20150308193812.GW28806@sirena.org.uk> <54FD4E64.2070909@collabora.co.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Ce6hu2nuSYv2TQrx" Content-Disposition: inline In-Reply-To: <54FD4E64.2070909@collabora.co.uk> X-Cookie: Editing is a rewording activity. 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 1/1] regulator: Only enable disabled regulators on resume 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 --Ce6hu2nuSYv2TQrx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Mar 09, 2015 at 08:40:20AM +0100, Javier Martinez Canillas wrote: > On 03/08/2015 08:38 PM, Mark Brown wrote: > > On Wed, Mar 04, 2015 at 02:45:00PM +0100, Javier Martinez Canillas wrote: > >> The thing is that _regulator_is_enabled() used to return -EINVAL if > >> the rdev didn't have an .is_enabled callback but that changed in > >> commit 9a7f6a4c6edc8 ("regulator: Assume regulators are enabled if > >> they don't report anything") and now returns 1 in that case. But > >> _regulator_enable() was not changed and is still checking for -EINVAL > >> which seems to me like a left over after the mentioned commit. > > You mean _do_enable(), not _enable() here. It's not really a leftover > No, I meant _enable() here. What I said is that _enable() is checking > if -EINVAL was returned by _is_enabled(): Then we have an abstraction problem if we're trying to do things in plain _enable() - _do_enable() is supposed to be hiding all this stuff. --Ce6hu2nuSYv2TQrx Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVAB+nAAoJECTWi3JdVIfQSeQH/1MFmFkBHQykfG/EqXs2fV6D bzJq7+TBdklmAAg7RWrKtsGjYqNDsAQir8kw3VJc0fWMyp1lqrwlwbqnEqFvdTwk XIKBMwqewPj3+fbtpAI7UpPMTAn8MjV1nEiKXPxOgoL4AfX84d0+Z7uDjdXhEo90 07wMDf79xqqxaPnF5rrN2eGTZB5yEuA9uWrvdols5/MoWS76uJVGUH+fBDlupmLp 3JuMy+cJ/fohCB6MVSlblRTZetyq5pmdp6JpGMuR+hNrvLQsK2vkH57vsqpCmAbP +TKBaiTzdrxCIpqVEwnlZ5MG8VwRU4RlrlqoSuEiaJe4XmF4p99Ix0QalL9V7k4= =haNU -----END PGP SIGNATURE----- --Ce6hu2nuSYv2TQrx--