ASoC: Remove unneeded suspend bias managment from CODEC drivers
[safe/jmp/linux-2.6] / sound / soc / codecs / wm8510.c
index 94cab49..d352700 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright 2006 Wolfson Microelectronics PLC.
  *
- * Author: Liam Girdwood <liam.girdwood@wolfsonmicro.com>
+ * Author: Liam Girdwood <lrg@slimlogic.co.uk>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -58,55 +58,7 @@ static const u16 wm8510_reg[WM8510_CACHEREGNUM] = {
 #define WM8510_POWER1_BIASEN  0x08
 #define WM8510_POWER1_BUFIOEN 0x10
 
-/*
- * read wm8510 register cache
- */
-static inline unsigned int wm8510_read_reg_cache(struct snd_soc_codec *codec,
-       unsigned int reg)
-{
-       u16 *cache = codec->reg_cache;
-       if (reg == WM8510_RESET)
-               return 0;
-       if (reg >= WM8510_CACHEREGNUM)
-               return -1;
-       return cache[reg];
-}
-
-/*
- * write wm8510 register cache
- */
-static inline void wm8510_write_reg_cache(struct snd_soc_codec *codec,
-       u16 reg, unsigned int value)
-{
-       u16 *cache = codec->reg_cache;
-       if (reg >= WM8510_CACHEREGNUM)
-               return;
-       cache[reg] = value;
-}
-
-/*
- * write to the WM8510 register space
- */
-static int wm8510_write(struct snd_soc_codec *codec, unsigned int reg,
-       unsigned int value)
-{
-       u8 data[2];
-
-       /* data is
-        *   D15..D9 WM8510 register offset
-        *   D8...D0 register data
-        */
-       data[0] = (reg << 1) | ((value >> 8) & 0x0001);
-       data[1] = value & 0x00ff;
-
-       wm8510_write_reg_cache(codec, reg, value);
-       if (codec->hw_write(codec->control_data, data, 2) == 2)
-               return 0;
-       else
-               return -EIO;
-}
-
-#define wm8510_reset(c)        wm8510_write(c, WM8510_RESET, 0)
+#define wm8510_reset(c)        snd_soc_write(c, WM8510_RESET, 0)
 
 static const char *wm8510_companding[] = { "Off", "NC", "u-law", "A-law" };
 static const char *wm8510_deemp[] = { "None", "32kHz", "44.1kHz", "48kHz" };
@@ -171,22 +123,6 @@ SOC_SINGLE("Capture Boost(+20dB)", WM8510_ADCBOOST,  8, 1, 0),
 SOC_SINGLE("Mono Playback Switch", WM8510_MONOMIX, 6, 1, 1),
 };
 
-/* add non dapm controls */
-static int wm8510_add_controls(struct snd_soc_codec *codec)
-{
-       int err, i;
-
-       for (i = 0; i < ARRAY_SIZE(wm8510_snd_controls); i++) {
-               err = snd_ctl_add(codec->card,
-                               snd_soc_cnew(&wm8510_snd_controls[i], codec,
-                                       NULL));
-               if (err < 0)
-                       return err;
-       }
-
-       return 0;
-}
-
 /* Speaker Output Mixer */
 static const struct snd_kcontrol_new wm8510_speaker_mixer_controls[] = {
 SOC_DAPM_SINGLE("Line Bypass Switch", WM8510_SPKMIX, 1, 1, 0),
@@ -227,9 +163,9 @@ SND_SOC_DAPM_PGA("SpkN Out", WM8510_POWER3, 5, 0, NULL, 0),
 SND_SOC_DAPM_PGA("SpkP Out", WM8510_POWER3, 6, 0, NULL, 0),
 SND_SOC_DAPM_PGA("Mono Out", WM8510_POWER3, 7, 0, NULL, 0),
 
-SND_SOC_DAPM_PGA("Mic PGA", WM8510_POWER2, 2, 0,
-                &wm8510_micpga_controls[0],
-                ARRAY_SIZE(wm8510_micpga_controls)),
+SND_SOC_DAPM_MIXER("Mic PGA", WM8510_POWER2, 2, 0,
+                  &wm8510_micpga_controls[0],
+                  ARRAY_SIZE(wm8510_micpga_controls)),
 SND_SOC_DAPM_MIXER("Boost Mixer", WM8510_POWER2, 4, 0,
        &wm8510_boost_controls[0],
        ARRAY_SIZE(wm8510_boost_controls)),
@@ -283,7 +219,6 @@ static int wm8510_add_widgets(struct snd_soc_codec *codec)
 
        snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
 
-       snd_soc_dapm_new_widgets(codec);
        return 0;
 }
 
@@ -314,7 +249,7 @@ static void pll_factors(unsigned int target, unsigned int source)
 
        if ((Ndiv < 6) || (Ndiv > 12))
                printk(KERN_WARNING
-                       "WM8510 N value %d outwith recommended range!d\n",
+                       "WM8510 N value %u outwith recommended range!d\n",
                        Ndiv);
 
        pll_div.n = Ndiv;
@@ -335,35 +270,35 @@ static void pll_factors(unsigned int target, unsigned int source)
        pll_div.k = K;
 }
 
-static int wm8510_set_dai_pll(struct snd_soc_dai *codec_dai,
-               int pll_id, unsigned int freq_in, unsigned int freq_out)
+static int wm8510_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id,
+               int source, unsigned int freq_in, unsigned int freq_out)
 {
        struct snd_soc_codec *codec = codec_dai->codec;
        u16 reg;
 
        if (freq_in == 0 || freq_out == 0) {
                /* Clock CODEC directly from MCLK */
-               reg = wm8510_read_reg_cache(codec, WM8510_CLOCK);
-               wm8510_write(codec, WM8510_CLOCK, reg & 0x0ff);
+               reg = snd_soc_read(codec, WM8510_CLOCK);
+               snd_soc_write(codec, WM8510_CLOCK, reg & 0x0ff);
 
                /* Turn off PLL */
-               reg = wm8510_read_reg_cache(codec, WM8510_POWER1);
-               wm8510_write(codec, WM8510_POWER1, reg & 0x1df);
+               reg = snd_soc_read(codec, WM8510_POWER1);
+               snd_soc_write(codec, WM8510_POWER1, reg & 0x1df);
                return 0;
        }
 
-       pll_factors(freq_out*8, freq_in);
+       pll_factors(freq_out*4, freq_in);
 
-       wm8510_write(codec, WM8510_PLLN, (pll_div.pre_div << 4) | pll_div.n);
-       wm8510_write(codec, WM8510_PLLK1, pll_div.k >> 18);
-       wm8510_write(codec, WM8510_PLLK2, (pll_div.k >> 9) & 0x1ff);
-       wm8510_write(codec, WM8510_PLLK3, pll_div.k & 0x1ff);
-       reg = wm8510_read_reg_cache(codec, WM8510_POWER1);
-       wm8510_write(codec, WM8510_POWER1, reg | 0x020);
+       snd_soc_write(codec, WM8510_PLLN, (pll_div.pre_div << 4) | pll_div.n);
+       snd_soc_write(codec, WM8510_PLLK1, pll_div.k >> 18);
+       snd_soc_write(codec, WM8510_PLLK2, (pll_div.k >> 9) & 0x1ff);
+       snd_soc_write(codec, WM8510_PLLK3, pll_div.k & 0x1ff);
+       reg = snd_soc_read(codec, WM8510_POWER1);
+       snd_soc_write(codec, WM8510_POWER1, reg | 0x020);
 
        /* Run CODEC from PLL instead of MCLK */
-       reg = wm8510_read_reg_cache(codec, WM8510_CLOCK);
-       wm8510_write(codec, WM8510_CLOCK, reg | 0x100);
+       reg = snd_soc_read(codec, WM8510_CLOCK);
+       snd_soc_write(codec, WM8510_CLOCK, reg | 0x100);
 
        return 0;
 }
@@ -379,24 +314,24 @@ static int wm8510_set_dai_clkdiv(struct snd_soc_dai *codec_dai,
 
        switch (div_id) {
        case WM8510_OPCLKDIV:
-               reg = wm8510_read_reg_cache(codec, WM8510_GPIO) & 0x1cf;
-               wm8510_write(codec, WM8510_GPIO, reg | div);
+               reg = snd_soc_read(codec, WM8510_GPIO) & 0x1cf;
+               snd_soc_write(codec, WM8510_GPIO, reg | div);
                break;
        case WM8510_MCLKDIV:
-               reg = wm8510_read_reg_cache(codec, WM8510_CLOCK) & 0x1f;
-               wm8510_write(codec, WM8510_CLOCK, reg | div);
+               reg = snd_soc_read(codec, WM8510_CLOCK) & 0x11f;
+               snd_soc_write(codec, WM8510_CLOCK, reg | div);
                break;
        case WM8510_ADCCLK:
-               reg = wm8510_read_reg_cache(codec, WM8510_ADC) & 0x1f7;
-               wm8510_write(codec, WM8510_ADC, reg | div);
+               reg = snd_soc_read(codec, WM8510_ADC) & 0x1f7;
+               snd_soc_write(codec, WM8510_ADC, reg | div);
                break;
        case WM8510_DACCLK:
-               reg = wm8510_read_reg_cache(codec, WM8510_DAC) & 0x1f7;
-               wm8510_write(codec, WM8510_DAC, reg | div);
+               reg = snd_soc_read(codec, WM8510_DAC) & 0x1f7;
+               snd_soc_write(codec, WM8510_DAC, reg | div);
                break;
        case WM8510_BCLKDIV:
-               reg = wm8510_read_reg_cache(codec, WM8510_CLOCK) & 0x1e3;
-               wm8510_write(codec, WM8510_CLOCK, reg | div);
+               reg = snd_soc_read(codec, WM8510_CLOCK) & 0x1e3;
+               snd_soc_write(codec, WM8510_CLOCK, reg | div);
                break;
        default:
                return -EINVAL;
@@ -410,7 +345,7 @@ static int wm8510_set_dai_fmt(struct snd_soc_dai *codec_dai,
 {
        struct snd_soc_codec *codec = codec_dai->codec;
        u16 iface = 0;
-       u16 clk = wm8510_read_reg_cache(codec, WM8510_CLOCK) & 0x1fe;
+       u16 clk = snd_soc_read(codec, WM8510_CLOCK) & 0x1fe;
 
        /* set master/slave audio interface */
        switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
@@ -457,19 +392,20 @@ static int wm8510_set_dai_fmt(struct snd_soc_dai *codec_dai,
                return -EINVAL;
        }
 
-       wm8510_write(codec, WM8510_IFACE, iface);
-       wm8510_write(codec, WM8510_CLOCK, clk);
+       snd_soc_write(codec, WM8510_IFACE, iface);
+       snd_soc_write(codec, WM8510_CLOCK, clk);
        return 0;
 }
 
 static int wm8510_pcm_hw_params(struct snd_pcm_substream *substream,
-       struct snd_pcm_hw_params *params)
+                               struct snd_pcm_hw_params *params,
+                               struct snd_soc_dai *dai)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
        struct snd_soc_device *socdev = rtd->socdev;
-       struct snd_soc_codec *codec = socdev->codec;
-       u16 iface = wm8510_read_reg_cache(codec, WM8510_IFACE) & 0x19f;
-       u16 adn = wm8510_read_reg_cache(codec, WM8510_ADD) & 0x1f1;
+       struct snd_soc_codec *codec = socdev->card->codec;
+       u16 iface = snd_soc_read(codec, WM8510_IFACE) & 0x19f;
+       u16 adn = snd_soc_read(codec, WM8510_ADD) & 0x1f1;
 
        /* bit size */
        switch (params_format(params)) {
@@ -488,40 +424,40 @@ static int wm8510_pcm_hw_params(struct snd_pcm_substream *substream,
 
        /* filter coefficient */
        switch (params_rate(params)) {
-       case SNDRV_PCM_RATE_8000:
+       case 8000:
                adn |= 0x5 << 1;
                break;
-       case SNDRV_PCM_RATE_11025:
+       case 11025:
                adn |= 0x4 << 1;
                break;
-       case SNDRV_PCM_RATE_16000:
+       case 16000:
                adn |= 0x3 << 1;
                break;
-       case SNDRV_PCM_RATE_22050:
+       case 22050:
                adn |= 0x2 << 1;
                break;
-       case SNDRV_PCM_RATE_32000:
+       case 32000:
                adn |= 0x1 << 1;
                break;
-       case SNDRV_PCM_RATE_44100:
-       case SNDRV_PCM_RATE_48000:
+       case 44100:
+       case 48000:
                break;
        }
 
-       wm8510_write(codec, WM8510_IFACE, iface);
-       wm8510_write(codec, WM8510_ADD, adn);
+       snd_soc_write(codec, WM8510_IFACE, iface);
+       snd_soc_write(codec, WM8510_ADD, adn);
        return 0;
 }
 
 static int wm8510_mute(struct snd_soc_dai *dai, int mute)
 {
        struct snd_soc_codec *codec = dai->codec;
-       u16 mute_reg = wm8510_read_reg_cache(codec, WM8510_DAC) & 0xffbf;
+       u16 mute_reg = snd_soc_read(codec, WM8510_DAC) & 0xffbf;
 
        if (mute)
-               wm8510_write(codec, WM8510_DAC, mute_reg | 0x40);
+               snd_soc_write(codec, WM8510_DAC, mute_reg | 0x40);
        else
-               wm8510_write(codec, WM8510_DAC, mute_reg);
+               snd_soc_write(codec, WM8510_DAC, mute_reg);
        return 0;
 }
 
@@ -529,13 +465,13 @@ static int wm8510_mute(struct snd_soc_dai *dai, int mute)
 static int wm8510_set_bias_level(struct snd_soc_codec *codec,
        enum snd_soc_bias_level level)
 {
-       u16 power1 = wm8510_read_reg_cache(codec, WM8510_POWER1) & ~0x3;
+       u16 power1 = snd_soc_read(codec, WM8510_POWER1) & ~0x3;
 
        switch (level) {
        case SND_SOC_BIAS_ON:
        case SND_SOC_BIAS_PREPARE:
                power1 |= 0x1;  /* VMID 50k */
-               wm8510_write(codec, WM8510_POWER1, power1);
+               snd_soc_write(codec, WM8510_POWER1, power1);
                break;
 
        case SND_SOC_BIAS_STANDBY:
@@ -543,18 +479,18 @@ static int wm8510_set_bias_level(struct snd_soc_codec *codec,
 
                if (codec->bias_level == SND_SOC_BIAS_OFF) {
                        /* Initial cap charge at VMID 5k */
-                       wm8510_write(codec, WM8510_POWER1, power1 | 0x3);
+                       snd_soc_write(codec, WM8510_POWER1, power1 | 0x3);
                        mdelay(100);
                }
 
                power1 |= 0x2;  /* VMID 500k */
-               wm8510_write(codec, WM8510_POWER1, power1);
+               snd_soc_write(codec, WM8510_POWER1, power1);
                break;
 
        case SND_SOC_BIAS_OFF:
-               wm8510_write(codec, WM8510_POWER1, 0);
-               wm8510_write(codec, WM8510_POWER2, 0);
-               wm8510_write(codec, WM8510_POWER3, 0);
+               snd_soc_write(codec, WM8510_POWER1, 0);
+               snd_soc_write(codec, WM8510_POWER2, 0);
+               snd_soc_write(codec, WM8510_POWER3, 0);
                break;
        }
 
@@ -569,6 +505,14 @@ static int wm8510_set_bias_level(struct snd_soc_codec *codec,
 #define WM8510_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
        SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
 
+static struct snd_soc_dai_ops wm8510_dai_ops = {
+       .hw_params      = wm8510_pcm_hw_params,
+       .digital_mute   = wm8510_mute,
+       .set_fmt        = wm8510_set_dai_fmt,
+       .set_clkdiv     = wm8510_set_dai_clkdiv,
+       .set_pll        = wm8510_set_dai_pll,
+};
+
 struct snd_soc_dai wm8510_dai = {
        .name = "WM8510 HiFi",
        .playback = {
@@ -583,22 +527,15 @@ struct snd_soc_dai wm8510_dai = {
                .channels_max = 2,
                .rates = WM8510_RATES,
                .formats = WM8510_FORMATS,},
-       .ops = {
-               .hw_params = wm8510_pcm_hw_params,
-       },
-       .dai_ops = {
-               .digital_mute = wm8510_mute,
-               .set_fmt = wm8510_set_dai_fmt,
-               .set_clkdiv = wm8510_set_dai_clkdiv,
-               .set_pll = wm8510_set_dai_pll,
-       },
+       .ops = &wm8510_dai_ops,
+       .symmetric_rates = 1,
 };
 EXPORT_SYMBOL_GPL(wm8510_dai);
 
 static int wm8510_suspend(struct platform_device *pdev, pm_message_t state)
 {
        struct snd_soc_device *socdev = platform_get_drvdata(pdev);
-       struct snd_soc_codec *codec = socdev->codec;
+       struct snd_soc_codec *codec = socdev->card->codec;
 
        wm8510_set_bias_level(codec, SND_SOC_BIAS_OFF);
        return 0;
@@ -607,7 +544,7 @@ static int wm8510_suspend(struct platform_device *pdev, pm_message_t state)
 static int wm8510_resume(struct platform_device *pdev)
 {
        struct snd_soc_device *socdev = platform_get_drvdata(pdev);
-       struct snd_soc_codec *codec = socdev->codec;
+       struct snd_soc_codec *codec = socdev->card->codec;
        int i;
        u8 data[2];
        u16 *cache = codec->reg_cache;
@@ -619,7 +556,7 @@ static int wm8510_resume(struct platform_device *pdev)
                codec->hw_write(codec->control_data, data, 2);
        }
        wm8510_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-       wm8510_set_bias_level(codec, codec->suspend_bias_level);
+
        return 0;
 }
 
@@ -627,15 +564,14 @@ static int wm8510_resume(struct platform_device *pdev)
  * initialise the WM8510 driver
  * register the mixer and dsp interfaces with the kernel
  */
-static int wm8510_init(struct snd_soc_device *socdev)
+static int wm8510_init(struct snd_soc_device *socdev,
+                      enum snd_soc_control_type control)
 {
-       struct snd_soc_codec *codec = socdev->codec;
+       struct snd_soc_codec *codec = socdev->card->codec;
        int ret = 0;
 
        codec->name = "WM8510";
        codec->owner = THIS_MODULE;
-       codec->read = wm8510_read_reg_cache;
-       codec->write = wm8510_write;
        codec->set_bias_level = wm8510_set_bias_level;
        codec->dai = &wm8510_dai;
        codec->num_dai = 1;
@@ -645,31 +581,32 @@ static int wm8510_init(struct snd_soc_device *socdev)
        if (codec->reg_cache == NULL)
                return -ENOMEM;
 
+       ret = snd_soc_codec_set_cache_io(codec, 7, 9, control);
+       if (ret < 0) {
+               printk(KERN_ERR "wm8510: failed to set cache I/O: %d\n",
+                      ret);
+               goto err;
+       }
+
        wm8510_reset(codec);
 
        /* register pcms */
        ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1);
        if (ret < 0) {
                printk(KERN_ERR "wm8510: failed to create pcms\n");
-               goto pcm_err;
+               goto err;
        }
 
        /* power on device */
        codec->bias_level = SND_SOC_BIAS_OFF;
        wm8510_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
-       wm8510_add_controls(codec);
+       snd_soc_add_controls(codec, wm8510_snd_controls,
+                               ARRAY_SIZE(wm8510_snd_controls));
        wm8510_add_widgets(codec);
-       ret = snd_soc_register_card(socdev);
-       if (ret < 0) {
-               printk(KERN_ERR "wm8510: failed to register card\n");
-               goto card_err;
-       }
+
        return ret;
 
-card_err:
-       snd_soc_free_pcms(socdev);
-       snd_soc_dapm_free(socdev);
-pcm_err:
+err:
        kfree(codec->reg_cache);
        return ret;
 }
@@ -686,13 +623,13 @@ static int wm8510_i2c_probe(struct i2c_client *i2c,
                            const struct i2c_device_id *id)
 {
        struct snd_soc_device *socdev = wm8510_socdev;
-       struct snd_soc_codec *codec = socdev->codec;
+       struct snd_soc_codec *codec = socdev->card->codec;
        int ret;
 
        i2c_set_clientdata(i2c, codec);
        codec->control_data = i2c;
 
-       ret = wm8510_init(socdev);
+       ret = wm8510_init(socdev, SND_SOC_I2C);
        if (ret < 0)
                pr_err("failed to initialise WM8510\n");
 
@@ -767,12 +704,12 @@ err_driver:
 static int __devinit wm8510_spi_probe(struct spi_device *spi)
 {
        struct snd_soc_device *socdev = wm8510_socdev;
-       struct snd_soc_codec *codec = socdev->codec;
+       struct snd_soc_codec *codec = socdev->card->codec;
        int ret;
 
        codec->control_data = spi;
 
-       ret = wm8510_init(socdev);
+       ret = wm8510_init(socdev, SND_SOC_SPI);
        if (ret < 0)
                dev_err(&spi->dev, "failed to initialise WM8510\n");
 
@@ -793,30 +730,6 @@ static struct spi_driver wm8510_spi_driver = {
        .probe          = wm8510_spi_probe,
        .remove         = __devexit_p(wm8510_spi_remove),
 };
-
-static int wm8510_spi_write(struct spi_device *spi, const char *data, int len)
-{
-       struct spi_transfer t;
-       struct spi_message m;
-       u8 msg[2];
-
-       if (len <= 0)
-               return 0;
-
-       msg[0] = data[0];
-       msg[1] = data[1];
-
-       spi_message_init(&m);
-       memset(&t, 0, (sizeof t));
-
-       t.tx_buf = &msg[0];
-       t.len = len;
-
-       spi_message_add_tail(&t, &m);
-       spi_sync(spi, &m);
-
-       return len;
-}
 #endif /* CONFIG_SPI_MASTER */
 
 static int wm8510_probe(struct platform_device *pdev)
@@ -833,7 +746,7 @@ static int wm8510_probe(struct platform_device *pdev)
        if (codec == NULL)
                return -ENOMEM;
 
-       socdev->codec = codec;
+       socdev->card->codec = codec;
        mutex_init(&codec->mutex);
        INIT_LIST_HEAD(&codec->dapm_widgets);
        INIT_LIST_HEAD(&codec->dapm_paths);
@@ -841,13 +754,11 @@ static int wm8510_probe(struct platform_device *pdev)
        wm8510_socdev = socdev;
 #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
        if (setup->i2c_address) {
-               codec->hw_write = (hw_write_t)i2c_master_send;
                ret = wm8510_add_i2c_device(pdev, setup);
        }
 #endif
 #if defined(CONFIG_SPI_MASTER)
        if (setup->spi) {
-               codec->hw_write = (hw_write_t)wm8510_spi_write;
                ret = spi_register_driver(&wm8510_spi_driver);
                if (ret != 0)
                        printk(KERN_ERR "can't add spi driver");
@@ -863,7 +774,7 @@ static int wm8510_probe(struct platform_device *pdev)
 static int wm8510_remove(struct platform_device *pdev)
 {
        struct snd_soc_device *socdev = platform_get_drvdata(pdev);
-       struct snd_soc_codec *codec = socdev->codec;
+       struct snd_soc_codec *codec = socdev->card->codec;
 
        if (codec->control_data)
                wm8510_set_bias_level(codec, SND_SOC_BIAS_OFF);
@@ -890,6 +801,18 @@ struct snd_soc_codec_device soc_codec_dev_wm8510 = {
 };
 EXPORT_SYMBOL_GPL(soc_codec_dev_wm8510);
 
+static int __init wm8510_modinit(void)
+{
+       return snd_soc_register_dai(&wm8510_dai);
+}
+module_init(wm8510_modinit);
+
+static void __exit wm8510_exit(void)
+{
+       snd_soc_unregister_dai(&wm8510_dai);
+}
+module_exit(wm8510_exit);
+
 MODULE_DESCRIPTION("ASoC WM8510 driver");
 MODULE_AUTHOR("Liam Girdwood");
 MODULE_LICENSE("GPL");