Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org, Koro Chen <koro.chen@mediatek.com>,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: Re: ASoC updates for v4.2
Date: Mon, 22 Jun 2015 15:43:38 +0100	[thread overview]
Message-ID: <20150622144338.GS14071@sirena.org.uk> (raw)
In-Reply-To: <s5h1th37s13.wl-tiwai@suse.de>


[-- Attachment #1.1: Type: text/plain, Size: 1747 bytes --]

On Mon, Jun 22, 2015 at 04:10:32PM +0200, Takashi Iwai wrote:
> Mark Brown wrote:
> > > Mark Brown wrote:
> > > > On Mon, Jun 22, 2015 at 11:58:24AM +0200, Takashi Iwai wrote:

> > > > > And, looking at the code, it seems calling runtime suspend in the
> > > > > following way at probe:

> > > > I'm confused, where's the call to runtime suspend?

> > Sorry, I'm still confused about what you're seeing in the probe - I know
> > where the callbacks for runtime PM are registered but I'm not seeing a
> > call to suspend (or something that I'd expect to trigger one) in the
> > above?

> There is no place calling runtime suspend manually, that's why the
> compiler catches and warns.

Right, that's why I was confused - you said it was calling runtime
suspend.

> > > But my concern above isn't about the warning itself.  I just stumbled
> > > on the code invoking runtime resume while looking at this warning, and
> > > wondered the behavior with CONFIG_PM=n.

> > > Usually this kind of warning could be simply fixed by adding a proper
> > > ifdef.  But, this driver calls runtime resume in the probe manually.

> > Sure, that's a fairly common pattern though?

> Depends.  The more common pattern seems to call pm_runtime_resume().
> And this will skip the call of runtime PM when CONFIG_PM=n.

That's another way of doing the same thing but it still leaves the same
thing with sharing the runtime code - if the runtime suspend and resume
paths are the same as the normal power up/down sequence you need to have
an explicit call to the shared power up function somewhere in probe and
can't ifdef things.

It does also mean that there's always going to be a bounce on of the
power in probe which is a bit sad though hardly the end of the world.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  parent reply	other threads:[~2015-06-22 14:43 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-22  9:26 ASoC updates for v4.2 Mark Brown
2015-06-22  9:58 ` Takashi Iwai
2015-06-22 10:30   ` Mark Brown
2015-06-22 11:24     ` Takashi Iwai
2015-06-22 13:57       ` Mark Brown
2015-06-22 14:10         ` Takashi Iwai
2015-06-22 14:40           ` Takashi Iwai
2015-06-22 14:43           ` Mark Brown [this message]
2015-06-22 14:55             ` Takashi Iwai
2015-06-23  7:45           ` Koro Chen
2015-06-23 10:14             ` Mark Brown

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=20150622144338.GS14071@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=koro.chen@mediatek.com \
    --cc=lgirdwood@gmail.com \
    --cc=tiwai@suse.de \
    /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