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 :(

Attachment: signature.asc
Description: PGP signature

Reply via email to