From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Re: [PATCH v2 2/2] regulator: add QCOM RPMh regulator driver Date: Wed, 2 May 2018 06:02:58 +0900 Message-ID: <20180501210258.GG2714@sirena.org.uk> References: <4b45f41996ea3344340e44fab2dc9e487572e209.1523673467.git.collinsd@codeaurora.org> <4e3353fe-ebb5-46bb-aa58-49ad04c4d9db@codeaurora.org> <132ab845-52d6-6192-4d8c-5a9c95410688@codeaurora.org> <20180424174507.GI22073@sirena.org.uk> <20a8f736-2687-f14f-eaa1-2b2c06eed629@codeaurora.org> <20180425103136.GB24769@sirena.org.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="iAL9S67WQOXgEPD9" Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: David Collins Cc: Doug Anderson , Liam Girdwood , Rob Herring , Mark Rutland , linux-arm-msm@vger.kernel.org, Linux ARM , devicetree@vger.kernel.org, LKML , Rajendra Nayak , Stephen Boyd , Matthias Kaehlcke List-Id: linux-arm-msm@vger.kernel.org --iAL9S67WQOXgEPD9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Apr 25, 2018 at 02:04:56PM -0700, David Collins wrote: > > Using -EAGAIN for "I can't ever read the configuration from this > > regulator" doesn't seem right - it's not like any number of retries > > will ever manage to read the value back. > In this case, the _regulator_get_voltage() call can succeed, but only > after a voltage is explicitly requested from the framework side. The ... > Do you still have reservations about using -EAGAIN for this purpose? If > so, which error code would you suggest using? Yes, that's clearly a problem - -EAGAIN is more for situations where you can just immediately retry like signal interruptions. If the caller repetedly sits and tries to read the voltage it'll never succeed unless something else comes along and sets something. --iAL9S67WQOXgEPD9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlro1gEACgkQJNaLcl1U h9BGTQf8D2BYeALtbrEIcuMc/85tjolOzrgVsLBNiv0aNRFbRasEaxXKT8H/rLrs s4tWN/IWo6XGvvyuOum/AdBrQZQj8ds+bIjY/RqSwnrZo2ao/zB4aOmpcJUeNl5I mivV6GJCDiAVmyCnmadAs4Rw2pCtPwIx00lYwxE/Gs34OT6gMBo+PZsMIO3aiUwi QyH7vAgdAL9rphGa7QL6AYI01/SKZDzE6UvVYJYtX/6vrtPZG315N4PiMT+/wcqs XrQ1Yka8uyErp/wPOW30zlJc1O4rPw1CiktxDqnNlI2BLdpsdoLDNDfim31lNw7i PyAoFSHGC/7OAJ8sSl8TwFAAhYg47g== =KPy2 -----END PGP SIGNATURE----- --iAL9S67WQOXgEPD9-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: broonie@kernel.org (Mark Brown) Date: Wed, 2 May 2018 06:02:58 +0900 Subject: [PATCH v2 2/2] regulator: add QCOM RPMh regulator driver In-Reply-To: References: <4b45f41996ea3344340e44fab2dc9e487572e209.1523673467.git.collinsd@codeaurora.org> <4e3353fe-ebb5-46bb-aa58-49ad04c4d9db@codeaurora.org> <132ab845-52d6-6192-4d8c-5a9c95410688@codeaurora.org> <20180424174507.GI22073@sirena.org.uk> <20a8f736-2687-f14f-eaa1-2b2c06eed629@codeaurora.org> <20180425103136.GB24769@sirena.org.uk> Message-ID: <20180501210258.GG2714@sirena.org.uk> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Wed, Apr 25, 2018 at 02:04:56PM -0700, David Collins wrote: > > Using -EAGAIN for "I can't ever read the configuration from this > > regulator" doesn't seem right - it's not like any number of retries > > will ever manage to read the value back. > In this case, the _regulator_get_voltage() call can succeed, but only > after a voltage is explicitly requested from the framework side. The ... > Do you still have reservations about using -EAGAIN for this purpose? If > so, which error code would you suggest using? Yes, that's clearly a problem - -EAGAIN is more for situations where you can just immediately retry like signal interruptions. If the caller repetedly sits and tries to read the voltage it'll never succeed unless something else comes along and sets something. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 488 bytes Desc: not available URL: