[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140307023747.GT13126@sirena.org.uk>
Date: Fri, 7 Mar 2014 10:37:47 +0800
From: Mark Brown <broonie@...nel.org>
To: Krzysztof Kozlowski <k.kozlowski@...sung.com>
Cc: Sangbeom Kim <sbkim73@...sung.com>,
Liam Girdwood <lgirdwood@...il.com>,
Samuel Ortiz <sameo@...ux.intel.com>,
Lee Jones <lee.jones@...aro.org>, linux-kernel@...r.kernel.org,
linux-samsung-soc@...r.kernel.org,
Kyungmin Park <kyungmin.park@...sung.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
Tomasz Figa <t.figa@...sung.com>,
Yadwinder Singh Brar <yadi.brar@...sung.com>,
Sachin Kamat <sachin.kamat@...aro.org>
Subject: Re: [PATCH 2/3] regulator: s2mps11: Add set_suspend_disable for
S2MPS14
On Thu, Mar 06, 2014 at 03:42:22PM +0100, Krzysztof Kozlowski wrote:
> However in that case the driver won't be able later to change that value
> back to "normal enable" (enable_mask). Consider such flow:
> 1. System is going to suspend.
> 2. Some regulator has "rstate->disabled" so set_suspend_disable() is
> called on it.
> 3. The "suspend" value is written to the device for given regulator and
> it is stored as "enable" value.
> 4. If regulator is enabled during here then the same "suspend" value
> will be written.
> 5. System is suspended.
> 6. After resuming regulator_suspend_finish() calls
> _regulator_do_enable() on the regulator... which will write the
> "suspend" value because the driver cannot differentiate between this
> enable and previous.
> I assume that this may not be a problem because:
> 1. Regulator will be still turned on (the "suspend" value tells PMIC to
> enable the regulator when SoC enables power).
> 2. The first disable of regulator may bring back "enable" value back to
> normal mode.
> Am I thinking here correctly?
I'm not entirely sure I follow here. Why would a disable reset the
enable value? My understanding is that this is a bitfield with several
values, off, on always and on when they system is active. The suspend
state is being tracked with a variable so I'm not sure why disabling
would reset it?
There is a bit of an issue if the regulator is disabled during runtime
but enabled in suspend but that's hard to resolve and I'm not sure that
it's a realistic issue.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists