From: Mark Brown Subject: Re: [PATCH 7/7] regulator: core: Remove loop disabling supplies in regulator_force_disable() Date: Tue, 20 Nov 2018 16:25:04 +0000 Message-ID: <20181120162504.GJ3894@sirena.org.uk> References: <20181120002654.1891-1-dianders@chromium.org> <20181120002654.1891-7-dianders@chromium.org> <20181120155458.GG3894@sirena.org.uk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="aznLbwQ42o7LEaqN" Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Doug Anderson Cc: Bjorn Andersson , Evan Green , Stephen Boyd , digetx@gmail.com, ryandcase@chromium.org, David Collins , linux-arm-msm , Liam Girdwood , LKML List-Id: linux-arm-msm@vger.kernel.org --aznLbwQ42o7LEaqN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Nov 20, 2018 at 08:04:57AM -0800, Doug Anderson wrote: > In general it's hard for me to reason about how the system in general > should behave after regulator_force_disable() is called. Is it > basically expected that the system will panic soon after? > Specifically other consumers of the same regulator will think it's on > but it won't actually be on. What should happen if one of those other > consumers calls disable/enable? Should the regulator turn back on? > ...or is the regulator permanently off until the system reboots? If something has been forced off the system is in very serious trouble and had a cricial safety problem, though the fact that there's error handling code that did the force disable might mean that there's some ability to recover the situation - for example, this might be part of thermal management or something like charger management. Other drivers do get notified if something gets forced off so a well written system will ensure that other users of a regulator that can get force disabled will have handling for this as should userspace. We don't have any such full systems in mainline, though - it is a really uncommon case. The usage in the Adreno drivers just looks to be another completely out of expectation regulator API usage in the QC code. I do wish there were a way to flag API calls as needing review :( --aznLbwQ42o7LEaqN Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlv0NV8ACgkQJNaLcl1U h9CllQf/c3nEJiuxm0cFd2sgAj07C0ivBaapX023nBIVeQPnU6hzBTIR5kjM6Qc2 wvL9iPK+wzOPSi1/TZF6hvqpcBuakHTzfy08qx14tuc7oWnPzcA+7llM6d1IepqA veSUyhOG8uSDOaSqx9nOP3yudn5GvcVo05hTzGnQgYOwHTDXiO5lB/dRL+CwEOmz uYNCP7Qb2Rh9X3ReCAU//mp5XLArbDYiojBlAx0WxYp49hD8Ox7WWO4wlxKqas11 DlIU5TqKTz/Uq7JfogIo0UdfhGjl2iyode95N0w+1+CBEjPud+ZfVHDLafZ9a/ij hyJf/N7vMipIJZzotQbzS8v7BnZYLg== =hfMO -----END PGP SIGNATURE----- --aznLbwQ42o7LEaqN--