[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20140219150729.GF2669@sirena.org.uk>
Date: Thu, 20 Feb 2014 00:07:29 +0900
From: Mark Brown <broonie@...nel.org>
To: Krzysztof Kozlowski <k.kozlowski@...sung.com>
Cc: Yadwinder Singh Brar <yadi.brar01@...il.com>,
Sangbeom Kim <sbkim73@...sung.com>,
Samuel Ortiz <sameo@...ux.intel.com>,
Lee Jones <lee.jones@...aro.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
linux-samsung-soc <linux-samsung-soc@...r.kernel.org>,
Kyungmin Park <kyungmin.park@...sung.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Chanwoo Choi <cw00.choi@...sung.com>,
Liam Girdwood <lgirdwood@...il.com>,
Tomasz Figa <t.figa@...sung.com>
Subject: Re: [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.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists