From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Stephen Warren <swarren@nvidia.com>
Cc: alsa-devel@alsa-project.org, lrg@slimlogic.co.uk
Subject: Re: [PATCH] ASoC: Use card as parameter to exported PM functions
Date: Fri, 28 Jan 2011 12:44:44 +0000 [thread overview]
Message-ID: <20110128124444.GB10350@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1296154616-1209-1-git-send-email-swarren@nvidia.com>
On Thu, Jan 27, 2011 at 11:56:56AM -0700, Stephen Warren wrote:
> This patch reworks the exported PM functions to take the card instead of the
> dev, thus allowing machine drivers to use a custom drvdata type. The
> disadvantage is that every machine driver that does this must then implement
> something similar to the soc_suspend/resume_dev functions in this patch.
This is exactly why I didn't implement them this way - almost all
drivers are just going to want to use the exact same boilerplate pm_ops
so we don't want them having to all implement the same mapping
functions. There's also enough callbacks from the core into the machine
drivers to mean that I'm not sure we'd need to do anything else, and
keeping things in the ASoC model is much more in the flow of pushing PM
into the core.
> An alternative might be to add a drvdata field to struct snd_soc_card,
> accompanied by snd_soc_set/get_drvdata functions.
> Another alternative would be to wrap the snd_soc_card stored in the drvdata
> within another type, and use container_of whenever the machine driver needed
> the data in the wrapper type.
Either of these would work. The former is going to be much more
friendly for users.
prev parent reply other threads:[~2011-01-28 12:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-27 18:56 [PATCH] ASoC: Use card as parameter to exported PM functions Stephen Warren
2011-01-28 12:44 ` Mark Brown [this message]
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=20110128124444.GB10350@opensource.wolfsonmicro.com \
--to=broonie@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=lrg@slimlogic.co.uk \
--cc=swarren@nvidia.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;
as well as URLs for NNTP newsgroup(s).