Linux Samsung SOC development
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Cc: Sangbeom Kim <sbkim73@samsung.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Samuel Ortiz <sameo@linux.intel.com>,
	Lee Jones <lee.jones@linaro.org>,
	linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Tomasz Figa <t.figa@samsung.com>,
	Yadwinder Singh Brar <yadi.brar@samsung.com>,
	Sachin Kamat <sachin.kamat@linaro.org>
Subject: Re: [PATCH 2/3] regulator: s2mps11: Add set_suspend_disable for S2MPS14
Date: Fri, 7 Mar 2014 10:37:47 +0800	[thread overview]
Message-ID: <20140307023747.GT13126@sirena.org.uk> (raw)
In-Reply-To: <1394116942.25853.14.camel@AMDC1943>

[-- Attachment #1: Type: text/plain, Size: 1559 bytes --]

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.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2014-03-07  3:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-05  9:22 [PATCH 0/3] regulator: s2mps11: Add support for S2MPS14 regulators Krzysztof Kozlowski
2014-03-05  9:22 ` [PATCH 1/3] " Krzysztof Kozlowski
2014-03-05  9:22 ` [PATCH 2/3] regulator: s2mps11: Add set_suspend_disable for S2MPS14 Krzysztof Kozlowski
2014-03-05  9:55   ` Lee Jones
2014-03-06  9:38   ` Mark Brown
2014-03-06  9:48     ` Krzysztof Kozlowski
2014-03-07  1:51       ` Mark Brown
2014-03-07  7:28         ` Krzysztof Kozlowski
2014-03-10  9:47           ` Lee Jones
2014-03-06 14:42     ` Krzysztof Kozlowski
2014-03-07  2:37       ` Mark Brown [this message]
2014-03-07 10:15         ` Krzysztof Kozlowski
2014-03-05  9:22 ` [PATCH 3/3] Documentation: mfd: s2mps11: Document support " Krzysztof Kozlowski
2014-03-05 10:04   ` Sachin Kamat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140307023747.GT13126@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=k.kozlowski@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=lee.jones@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=sachin.kamat@linaro.org \
    --cc=sameo@linux.intel.com \
    --cc=sbkim73@samsung.com \
    --cc=t.figa@samsung.com \
    --cc=yadi.brar@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox