Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932329AbcDKOLG (ORCPT ); Mon, 11 Apr 2016 10:11:06 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:36048 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754415AbcDKOLE (ORCPT ); Mon, 11 Apr 2016 10:11:04 -0400 Date: Mon, 11 Apr 2016 16:11:01 +0200 From: Thierry Reding To: Mark Brown Cc: Jon Hunter , Liam Girdwood , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/5] regulator: core: Resolve supply earlier Message-ID: <20160411141101.GB27400@ulmo.ba.sec> References: <1460038959-21592-1-git-send-email-thierry.reding@gmail.com> <20160411140300.GH3351@sirena.org.uk> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rJwd6BRFiFCcLxzm" Content-Disposition: inline In-Reply-To: <20160411140300.GH3351@sirena.org.uk> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2038 Lines: 53 --rJwd6BRFiFCcLxzm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 11, 2016 at 03:03:00PM +0100, Mark Brown wrote: > On Thu, Apr 07, 2016 at 04:22:35PM +0200, Thierry Reding wrote: >=20 > > + /* > > + * set_machine_constraints() needs the supply to be resolved in order > > + * to support querying the current voltage in bypass mode. Resolve it > > + * here to more easily handle deferred probing. > > + */ > > + ret =3D regulator_resolve_supply(rdev); > > + if (ret < 0) > > + goto scrub; >=20 > This shouldn't be a hard dependency: most regulators won't be in bypass > mode or otherwise depend on their parents enough to need this. I had initially proposed to resolve the supply only when necessary during regulator_get_voltage() when checking for bypass, perhaps that would after all be more appropriate here? Alternatively I guess we could conditionalize on bypass mode before resolving the supply early here, but I'm not sure how well that would work given how early in the regulator setup we are at this point. Thierry --rJwd6BRFiFCcLxzm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJXC7B0AAoJEN0jrNd/PrOhz0wP/Ajy5GCzUWYkkS2BABJ2CEDc jl+kcym02fqcoT75bALh+KwGhy7Cto2a89zUJWsOfIk1Nw+vpDsr8pZjtU3xl60A Qpo40YD8G4Lo3Ieou/plQ8QccM+gch7gXZwMXbQYG1fk+h8AbBLyBcoY01XBtEgU wHx6N+Q/co93FhJBZe5ZQ0Fellt76TjfKnU68tGQE7smi4xpdcfOd4iHgK7naqc8 jk08ZDx+9nAid4MnFbpBAr/Mn1wjDSOo5AJaDk2RVQvf+JOx4yOkFBAsP1O1bm0O mIx8IV7VszRnHFihqA0vy0HquKmBNXhI3enYcv4CORlIZ290rh+SVidMsAp+A4nA QX49PXw3tK9j4OaXLA+RnIoJ/JwgquzQuFjPkxDrMOp/Q66M5RSjunWW0NlBgsJ6 Ex/DgADs2XpLrIb3C17aVELbyf1I6Y3ZkGPQBHYAUOv2raJaOtzW272UdCMPGYiD nwm0vTaJ2v/6GtuzSwwpzC9MZSOTb5lGOH1d+lFSAdlbDBuolrxnoZSgOI2jZ/7N 3GuCQXtMNbj2D2lzMFZQ3/BYt2xNx/eArCt2vA/IUM5/wCrS9hDjzpgDjs5vQUgq 6bkNkJ9J2eGX3hZSbVcZVa12jvpTBgl/3X5MkhfXWBLhq+evgzOP6XSkNvFIfnoR FXkC2Eb2PKpnZSB3bM/Q =2wG1 -----END PGP SIGNATURE----- --rJwd6BRFiFCcLxzm--