linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>,
	"Rafael J. Wysocki" <rjw@sisk.pl>,
	Alan Stern <stern@rowland.harvard.edu>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: Vipul Kumar Samar <vipulkumar.samar@st.com>,
	Russell King <linux@arm.linux.org.uk>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	Grant Likely <grant.likely@secretlab.ca>,
	spi-devel-general@lists.sourceforge.net,
	Ulf Hansson <ulf.hansson@stericsson.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] spi/pl022: Activate resourses before deactivate them in suspend
Date: Sun, 28 Oct 2012 20:52:47 +0100	[thread overview]
Message-ID: <CACRpkdbCfxnSSLR6GoSbAxtfnwOivxCCrLtwnR=9tpwpfACqTQ@mail.gmail.com> (raw)
In-Reply-To: <20121027214642.GH4564@opensource.wolfsonmicro.com>

On Sat, Oct 27, 2012 at 11:46 PM, Mark Brown
<broonie@opensource.wolfsonmicro.com> wrote:
> On Fri, Oct 05, 2012 at 09:43:32AM +0200, Ulf Hansson wrote:
>
>> To be able to deactivate resourses in suspend, the resourses must
>> first be surely active. This is done with a pm_runtime_get_sync.
>> Once the resourses are restored to active state again in resume,
>> the runtime pm usage count can be decreased with a pm_runtime_put.
>
> The PM core will ensure devices are runtime resumed before we enter
> suspend precisely due to this sort of issue.

I asked the very same question to Ulf (in speech, sorry
so you couldn't see it...)

So I guess we are talking about drivers/base/main.c

in device_prepare()
pm_runtime_get_noresume() is called
and in device_complete()
pm_runtime_put_sync() is called.

Both put into current for in
commit 88d26136a256576e444db312179e17af6dd0ea87
on sep 19th.

Yes it seems like it will do the job.

Ulf can you comment on this...

Yours,
Linus Walleij

  reply	other threads:[~2012-10-28 19:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-05  7:43 [PATCH] spi/pl022: Activate resourses before deactivate them in suspend Ulf Hansson
     [not found] ` <1349423012-18048-1-git-send-email-ulf.hansson-0IS4wlFg1OjSUeElwK9/Pw@public.gmane.org>
2012-10-12 14:42   ` Ulf Hansson
     [not found]     ` <CAPDyKFpa8XoEy-kq3nq0dbRtM=a1wJ7cx=OzCOqMY1PmXrXJYw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-14  5:27       ` Mark Brown
2012-10-27 21:46 ` Mark Brown
2012-10-28 19:52   ` Linus Walleij [this message]
     [not found]     ` <CACRpkdbCfxnSSLR6GoSbAxtfnwOivxCCrLtwnR=9tpwpfACqTQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-28 20:28       ` Ulf Hansson
     [not found]         ` <CAPDyKFoOJz6608b4z2PoW8ODvTJVZRq-yB0itfXnuoXdR1SpGQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-10-28 21:09           ` Alan Stern
     [not found]             ` <Pine.LNX.4.44L0.1210281659520.9245-100000-pYrvlCTfrz9XsRXLowluHWD2FQJk+8+b@public.gmane.org>
2012-10-30 17:05               ` Ulf Hansson

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='CACRpkdbCfxnSSLR6GoSbAxtfnwOivxCCrLtwnR=9tpwpfACqTQ@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=broonie@opensource.wolfsonmicro.com \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux@arm.linux.org.uk \
    --cc=rjw@sisk.pl \
    --cc=spi-devel-general@lists.sourceforge.net \
    --cc=stern@rowland.harvard.edu \
    --cc=ulf.hansson@linaro.org \
    --cc=ulf.hansson@stericsson.com \
    --cc=vipulkumar.samar@st.com \
    --cc=viresh.kumar@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).