ASoC: Convert WM8753 to register via normal device probe

Previous thread: ASoC: Only unregister drivers we registered for WM8753 by Linux Kernel Mailing List on Thursday, March 26, 2009 - 12:08 pm. (1 message)

Next thread: ASoC: UDA1380: DATAI is slave only by Linux Kernel Mailing List on Thursday, March 26, 2009 - 12:09 pm. (1 message)
From: Linux Kernel Mailing List
Date: Thursday, March 26, 2009 - 12:08 pm

Gitweb:     http://git.kernel.org/linus/c2bac1606a937d4700f8fdd8e051a4c49593c41b
Commit:     c2bac1606a937d4700f8fdd8e051a4c49593c41b
Parent:     69e169da5a69cc991d54bb4d54f236523145756c
Author:     Mark Brown <broonie@opensource.wolfsonmicro.com>
AuthorDate: Tue Feb 24 23:33:12 2009 +0000
Committer:  Mark Brown <broonie@opensource.wolfsonmicro.com>
CommitDate: Tue Feb 24 23:49:53 2009 +0000

    ASoC: Convert WM8753 to register via normal device probe
    
    The base support for the only in-tree user, the GTA01, is out of tree
    and will be updated separately.
    
    Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/wm8753.c          |  369 +++++++++++++++++-------------------
 sound/soc/codecs/wm8753.h          |    6 -
 sound/soc/s3c24xx/neo1973_wm8753.c |    6 -
 3 files changed, 171 insertions(+), 210 deletions(-)

diff --git a/sound/soc/codecs/wm8753.c b/sound/soc/codecs/wm8753.c
index 4b42688..bc29558 100644
--- a/sound/soc/codecs/wm8753.c
+++ b/sound/soc/codecs/wm8753.c
@@ -63,12 +63,6 @@ MODULE_PARM_DESC(caps_charge, "WM8753 cap charge time (msecs)");
 static void wm8753_set_dai_mode(struct snd_soc_codec *codec,
 	unsigned int mode);
 
-/* codec private data */
-struct wm8753_priv {
-	unsigned int sysclk;
-	unsigned int pcmclk;
-};
-
 /*
  * wm8753 register cache
  * We can't read the WM8753 register space when we
@@ -93,6 +87,14 @@ static const u16 wm8753_reg[] = {
 	0x0000, 0x0000
 };
 
+/* codec private data */
+struct wm8753_priv {
+	unsigned int sysclk;
+	unsigned int pcmclk;
+	struct snd_soc_codec codec;
+	u16 reg_cache[ARRAY_SIZE(wm8753_reg)];
+};
+
 /*
  * read wm8753 register cache
  */
@@ -1542,36 +1544,24 @@ static int wm8753_resume(struct platform_device *pdev)
 	return 0;
 }
 
-/*
- * initialise the WM8753 driver
- * register the mixer and dsp interfaces with the kernel
- */
-static int wm8753_init(struct snd_soc_device *socdev)
+static struct snd_soc_codec *wm8753_codec;
+
+static ...
Previous thread: ASoC: Only unregister drivers we registered for WM8753 by Linux Kernel Mailing List on Thursday, March 26, 2009 - 12:08 pm. (1 message)

Next thread: ASoC: UDA1380: DATAI is slave only by Linux Kernel Mailing List on Thursday, March 26, 2009 - 12:09 pm. (1 message)