lkml.org 
[lkml]   [2014]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 11/14] regulator: s2mps11: Add opmode for S2MPS14 regulators
On Wed, Feb 19, 2014 at 03:19:00PM +0100, Krzysztof Kozlowski wrote:

> As I understand the suspend mode (correct me if I'm wrong), the
> regulator core during suspend to mem:
> 1. Calls suspend_set_state().
> 2. rstate->disabled is true so the ops->set_suspend_disable() is called.
> 3. The ops->set_suspend_disable() function (implemented by the driver)
> disables the regulator (e.g. through I2C commands /regmap/).
> 4. During resume the regulator is enabled normal way (ops->enable(), I2C
> again).

No, set_suspend_disable() should *not* disable the regulator, it should
configure what the regulator will do when the hardware enters suspend
mode. If we were just disabling the regulator there would be no point
in having a special operation, we could just use the normal operation.

> Possible problems:
> A. What happens if some driver using this regulator resumes earlier then
> regulator_suspend_finish()?

Nothing, if the system is not in suspend mode then configuring suspend
mode will have no impact.

> B. What happens if resuming regulator requires some other driver to be
> resumed earlier (e.g. I2C bus)? If regulator resumes before I2C bus then
> calling ops->enable() would fail.

It is expected that as part of exiting suspend mode the hardware will
revert to normal operational mode.
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2014-02-19 17:01    [W:0.066 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site