From: Mark Brown Subject: Re: [PATCH 2/7] regulator: core: Don't assume always_on when is_enabled returns err Date: Tue, 20 Nov 2018 16:00:10 +0000 Message-ID: <20181120160010.GH3894@sirena.org.uk> References: <20181120002654.1891-1-dianders@chromium.org> <20181120002654.1891-2-dianders@chromium.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="VkqCAaSJIySsbD6j" Return-path: Content-Disposition: inline In-Reply-To: <20181120002654.1891-2-dianders@chromium.org> Sender: linux-kernel-owner@vger.kernel.org To: Douglas Anderson Cc: Bjorn Andersson , evgreen@chromium.org, swboyd@chromium.org, Dmitry Osipenko , ryandcase@chromium.org, David Collins , linux-arm-msm@vger.kernel.org, Liam Girdwood , linux-kernel@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org --VkqCAaSJIySsbD6j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Nov 19, 2018 at 04:26:49PM -0800, Douglas Anderson wrote: > At boot sometimes regulators (like qcom-rpmh-regulator) will return > -EINVAL if we don't know the enable state of the regulator. We > shouldn't take this to mean that the regulator is an always-on > regulator, but that was what was happening since "-EINVAL" is non-zero > and a few places in the code were not properly checking for errors. This still results in breakage - if the regulator fails to read when we're initializing then we won't flag the regualtor as always_on, the regulator would need to tell the framework when it becomes readable. This hardware really is fragile :( --VkqCAaSJIySsbD6j Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlv0L4kACgkQJNaLcl1U h9DbRgf+L5WDk5UklVGYOblPPgBlRSumLujd5ibYIX1blsVHVHReGbGIlTN8Nde+ 48S3/7NA6PH3ARH+OamVq/q98RYfIlF9Jh11qMkd18YT8CmRxD7cws4e2js5R6JT rnLusouG/mDJZzzDDNnRLcTFId1SzDEU297/ZzGZ6GJnFdi/0nHLvc1JUOijOqmK fPB7p/UoQvjpF3ms8+9fLiMgf+EYl4cqsFvneUqUKd89YvzWBw9MyH9FDp9MXjH1 +wDkFmfqGTO1Lgjlah9N96cuLqcHZw2A7fOGxhjB45w8+OE/HUmk9qv2IhOpwvcp EztQjTIn6R+wKJt0baFWj+P2nMLAMA== =R5N5 -----END PGP SIGNATURE----- --VkqCAaSJIySsbD6j--