From: Marek Vasut <marek.vasut@gmail.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Takashi Iwai <tiwai@suse.de>,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
alsa-devel@alsa-project.org, Eric Miao <eric.y.miao@gmail.com>,
linux-arm-kernel@lists.arm.linux.org.uk
Subject: Re: [PATCH] Allow passing platform_data to devices attached to AC97 bus
Date: Tue, 21 Jul 2009 22:24:21 +0200 [thread overview]
Message-ID: <200907212224.22131.marek.vasut@gmail.com> (raw)
In-Reply-To: <20090721183056.GB28955@sirena.org.uk>
[-- Attachment #1: Type: text/plain, Size: 498 bytes --]
Dne Út 21. července 2009 20:30:56 Mark Brown napsal(a):
> On Tue, Jul 21, 2009 at 05:40:01PM +0200, Marek Vasut wrote:
> > Dne ??t 21. ??ervence 2009 17:16:07 Takashi Iwai napsal(a):
> >
> > +/* AC97 platform_data adding function */
> > +inline void snd_ac97_dev_add_pdata(struct snd_ac97 *ac97, void *data);
> > +
>
> I think Takashi asked for this to be done as an inline? I tend to agree
> with him.
Ok, this one fixes one more issue. Should be fine now. Please consider applying.
[-- Attachment #2: 0001-Allow-passing-platform_data-to-devices-attached-to-A.patch --]
[-- Type: text/x-patch, Size: 2099 bytes --]
From 082f09b9f3c1bbf3240610dc89baba33d47787b7 Mon Sep 17 00:00:00 2001
From: Marek Vasut <marek.vasut@gmail.com>
Date: Tue, 21 Jul 2009 16:22:29 +0200
Subject: [PATCH 1/5] Allow passing platform_data to devices attached to AC97 bus
This patch allows passing platform_data to devices attached to AC97 bus
(like touchscreens, battery measurement chips ...).
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
---
include/sound/ac97_codec.h | 6 ++++++
include/sound/soc-dai.h | 1 +
sound/soc/soc-core.c | 5 ++++-
3 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/include/sound/ac97_codec.h b/include/sound/ac97_codec.h
index 251fc1c..702f90d 100644
--- a/include/sound/ac97_codec.h
+++ b/include/sound/ac97_codec.h
@@ -642,4 +642,10 @@ int snd_ac97_pcm_double_rate_rules(struct snd_pcm_runtime *runtime);
/* ad hoc AC97 device driver access */
extern struct bus_type ac97_bus_type;
+/* AC97 platform_data adding function */
+static inline void snd_ac97_dev_add_pdata(struct snd_ac97 *ac97, void *data)
+{
+ ac97->dev.platform_data = data;
+}
+
#endif /* __SOUND_AC97_CODEC_H */
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 352d7ee..0d65a03 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -179,6 +179,7 @@ struct snd_soc_dai {
int ac97_control;
struct device *dev;
+ void *ac97_pdata; /* platform_data for the ac97 codec */
/* DAI callbacks */
int (*probe)(struct platform_device *pdev,
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 1d70829..0b12fe5 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1381,8 +1381,11 @@ int snd_soc_init_card(struct snd_soc_device *socdev)
continue;
}
}
- if (card->dai_link[i].codec_dai->ac97_control)
+ if (card->dai_link[i].codec_dai->ac97_control) {
ac97 = 1;
+ codec->ac97->dev.platform_data =
+ card->dai_link[i].cpu_dai->ac97_pdata;
+ }
}
snprintf(codec->card->shortname, sizeof(codec->card->shortname),
"%s", card->name);
--
1.6.3.3
[-- Attachment #3: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
next prev parent reply other threads:[~2009-07-21 20:24 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-21 14:33 [PATCH] Allow passing platform_data to devices attached to AC97 bus Marek Vasut
2009-07-21 14:50 ` Takashi Iwai
2009-07-21 14:53 ` Mark Brown
2009-07-21 15:16 ` Takashi Iwai
2009-07-21 15:40 ` Marek Vasut
2009-07-21 18:30 ` Mark Brown
2009-07-21 19:51 ` Marek Vasut
2009-07-22 10:40 ` Mark Brown
2009-07-22 10:59 ` [PATCH 1/4] " Marek Vasut
2009-07-23 10:16 ` Mark Brown
2009-07-23 10:28 ` Takashi Iwai
2009-07-23 10:31 ` Mark Brown
2009-07-21 20:24 ` Marek Vasut [this message]
2009-07-21 20:59 ` [PATCH] " Takashi Iwai
2009-07-21 21:53 ` Marek Vasut
2009-07-21 22:13 ` Marek Vasut
2009-07-21 22:33 ` Russell King - ARM Linux
2009-07-21 22:39 ` Marek Vasut
2009-07-21 22:40 ` Marek Vasut
2009-07-21 22:34 ` Anton Vorontsov
2009-07-21 22:43 ` Marek Vasut
2009-07-22 11:01 ` [PATCH 1/4] " Marek Vasut
2009-07-22 11:02 ` [PATCH 2/4] Allow passing platform_data for pxa2xx-ac97 Marek Vasut
2009-07-23 10:27 ` Mark Brown
2009-07-23 14:16 ` Marek Vasut
2009-07-23 15:14 ` Mark Brown
2009-07-23 18:39 ` Marek Vasut
2009-07-28 5:28 ` Marek Vasut
2009-07-30 0:55 ` Marek Vasut
2009-08-13 20:40 ` Mark Brown
2009-08-13 23:34 ` Marek Vasut
2009-08-13 23:42 ` Anton Vorontsov
2009-08-14 8:57 ` Mark Brown
2009-07-22 11:04 ` [PATCH 3/4] Convert WM97xx driver to use platform_data Marek Vasut
2009-07-23 11:49 ` Mark Brown
2009-07-24 19:44 ` Robert Jarzmik
2009-07-24 21:03 ` Marek Vasut
2009-07-22 11:05 ` [PATCH 4/4] Convert all platforms to pass platform_data to wm97xx battery Marek Vasut
2009-07-22 18:09 ` Robert Jarzmik
2009-07-22 18:30 ` Marek Vasut
2009-07-25 20:55 ` Robert Jarzmik
2009-07-27 0:06 ` Marek Vasut
2009-07-21 20:25 ` [PATCH] Allow passing platform_data to devices attached to AC97 bus Marek Vasut
2009-07-21 15:41 ` Marek Vasut
2009-07-21 17:40 ` Marek Vasut
2009-07-21 18:27 ` Mark Brown
2009-07-21 18:38 ` Mark Brown
2009-07-21 17:42 ` Marek Vasut
2009-07-21 18:18 ` Marek Vasut
2009-07-21 15:11 ` Robert Jarzmik
2009-07-21 15:17 ` Takashi Iwai
2009-07-25 20:56 ` Robert Jarzmik
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=200907212224.22131.marek.vasut@gmail.com \
--to=marek.vasut@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=eric.y.miao@gmail.com \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux@arm.linux.org.uk \
--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