From: Mike Rapoport <mike@compulab.co.il>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Eric Miao <eric.y.miao@gmail.com>,
linux-arm-kernel <linux-arm-kernel@lists.arm.linux.org.uk>,
linux-input <linux-input@vger.kernel.org>
Subject: Re: [PATCH] input: make mainstone-wm97xx.c depend on MACH_MAINSTONE instead of ARCH_PXA
Date: Tue, 17 Jun 2008 14:52:23 +0300 [thread overview]
Message-ID: <4857A577.5030506@compulab.co.il> (raw)
In-Reply-To: <20080617095928.GD6114@rakim.wolfsonmicro.main>
Mark Brown wrote:
> On Tue, Jun 17, 2008 at 09:06:38AM +0800, Eric Miao wrote:
>
>> Mike Rapoport said it could be re-used for EM-X270, so I'd suggest this
>> better to be PXA generic, and pass platform data as you advised.
>
> Yeah, that's the ideal. Unfortunately passing platform data through
> AC97 is a bit of a can of worms :(
Probably something like the patch below may allow passing platform data at least
for ASoC devices:
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index e148db9..690aec4 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -92,13 +92,15 @@ static int soc_ac97_dev_unregister(struct snd_soc_codec *codec)
static void soc_ac97_device_release(struct device *dev){}
/* register ac97 codec to bus */
-static int soc_ac97_dev_register(struct snd_soc_codec *codec)
+static int soc_ac97_dev_register(struct snd_soc_device *socdev)
{
+ struct snd_soc_codec *codec = socdev->codec;
int err;
codec->ac97->dev.bus = &ac97_bus_type;
codec->ac97->dev.parent = NULL;
codec->ac97->dev.release = soc_ac97_device_release;
+ codec->ac97->dev.platform_data = socdev->dev->platform_data;
snprintf(codec->ac97->dev.bus_id, BUS_ID_SIZE, "%d-%d:%s",
codec->card->number, 0, codec->name);
@@ -1130,7 +1132,7 @@ int snd_soc_register_card(struct snd_soc_device *socdev)
mutex_lock(&codec->mutex);
#ifdef CONFIG_SND_SOC_AC97_BUS
if (ac97) {
- ret = soc_ac97_dev_register(codec);
+ ret = soc_ac97_dev_register(socdev);
if (ret < 0) {
printk(KERN_ERR "asoc: AC97 device register failed\n");
snd_card_free(codec->card);
> -------------------------------------------------------------------
> List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
> FAQ: http://www.arm.linux.org.uk/mailinglists/faq.php
> Etiquette: http://www.arm.linux.org.uk/mailinglists/etiquette.php
>
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2008-06-17 11:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-16 10:32 [PATCH] input: make mainstone-wm97xx.c depend on MACH_MAINSTONE instead of ARCH_PXA Eric Miao
2008-06-16 12:06 ` Mike Rapoport
2008-06-16 12:07 ` Mark Brown
2008-06-17 1:06 ` Eric Miao
2008-06-17 9:59 ` Mark Brown
2008-06-17 11:52 ` Mike Rapoport [this message]
2008-06-17 11:58 ` Mark Brown
2008-06-22 8:53 ` Russell King - ARM Linux
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=4857A577.5030506@compulab.co.il \
--to=mike@compulab.co.il \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=eric.y.miao@gmail.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-input@vger.kernel.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).