2 * DA7210 ALSA Soc codec driver
4 * Copyright (c) 2009 Dialog Semiconductor
5 * Written by David Chen <Dajun.chen@diasemi.com>
7 * Copyright (C) 2009 Renesas Solutions Corp.
8 * Cleanups by Kuninori Morimoto <morimoto.kuninori@renesas.com>
10 * Tested on SuperH Ecovec24 board with S16/S24 LE in 48KHz using I2S
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
18 #include <linux/delay.h>
19 #include <linux/i2c.h>
20 #include <linux/platform_device.h>
21 #include <linux/slab.h>
22 #include <sound/pcm.h>
23 #include <sound/pcm_params.h>
24 #include <sound/soc-dapm.h>
25 #include <sound/initval.h>
26 #include <sound/tlv.h>
30 /* DA7210 register space */
31 #define DA7210_STATUS 0x02
32 #define DA7210_STARTUP1 0x03
33 #define DA7210_MIC_L 0x07
34 #define DA7210_MIC_R 0x08
35 #define DA7210_INMIX_L 0x0D
36 #define DA7210_INMIX_R 0x0E
37 #define DA7210_ADC_HPF 0x0F
38 #define DA7210_ADC 0x10
39 #define DA7210_DAC_HPF 0x14
40 #define DA7210_DAC_L 0x15
41 #define DA7210_DAC_R 0x16
42 #define DA7210_DAC_SEL 0x17
43 #define DA7210_OUTMIX_L 0x1C
44 #define DA7210_OUTMIX_R 0x1D
45 #define DA7210_HP_L_VOL 0x21
46 #define DA7210_HP_R_VOL 0x22
47 #define DA7210_HP_CFG 0x23
48 #define DA7210_DAI_SRC_SEL 0x25
49 #define DA7210_DAI_CFG1 0x26
50 #define DA7210_DAI_CFG3 0x28
51 #define DA7210_PLL_DIV1 0x29
52 #define DA7210_PLL_DIV2 0x2A
53 #define DA7210_PLL_DIV3 0x2B
54 #define DA7210_PLL 0x2C
55 #define DA7210_A_HID_UNLOCK 0x8A
56 #define DA7210_A_TEST_UNLOCK 0x8B
57 #define DA7210_A_PLL1 0x90
58 #define DA7210_A_CP_MODE 0xA7
60 /* STARTUP1 bit fields */
61 #define DA7210_SC_MST_EN (1 << 0)
63 /* MIC_L bit fields */
64 #define DA7210_MICBIAS_EN (1 << 6)
65 #define DA7210_MIC_L_EN (1 << 7)
67 /* MIC_R bit fields */
68 #define DA7210_MIC_R_EN (1 << 7)
70 /* INMIX_L bit fields */
71 #define DA7210_IN_L_EN (1 << 7)
73 /* INMIX_R bit fields */
74 #define DA7210_IN_R_EN (1 << 7)
77 #define DA7210_ADC_L_EN (1 << 3)
78 #define DA7210_ADC_R_EN (1 << 7)
80 /* DAC/ADC HPF fields */
81 #define DA7210_VOICE_F0_MASK (0x7 << 4)
82 #define DA7210_VOICE_F0_25 (1 << 4)
83 #define DA7210_VOICE_EN (1 << 7)
85 /* DAC_SEL bit fields */
86 #define DA7210_DAC_L_SRC_DAI_L (4 << 0)
87 #define DA7210_DAC_L_EN (1 << 3)
88 #define DA7210_DAC_R_SRC_DAI_R (5 << 4)
89 #define DA7210_DAC_R_EN (1 << 7)
91 /* OUTMIX_L bit fields */
92 #define DA7210_OUT_L_EN (1 << 7)
94 /* OUTMIX_R bit fields */
95 #define DA7210_OUT_R_EN (1 << 7)
97 /* HP_CFG bit fields */
98 #define DA7210_HP_2CAP_MODE (1 << 1)
99 #define DA7210_HP_SENSE_EN (1 << 2)
100 #define DA7210_HP_L_EN (1 << 3)
101 #define DA7210_HP_MODE (1 << 6)
102 #define DA7210_HP_R_EN (1 << 7)
104 /* DAI_SRC_SEL bit fields */
105 #define DA7210_DAI_OUT_L_SRC (6 << 0)
106 #define DA7210_DAI_OUT_R_SRC (7 << 4)
108 /* DAI_CFG1 bit fields */
109 #define DA7210_DAI_WORD_S16_LE (0 << 0)
110 #define DA7210_DAI_WORD_S24_LE (2 << 0)
111 #define DA7210_DAI_FLEN_64BIT (1 << 2)
112 #define DA7210_DAI_MODE_MASTER (1 << 7)
114 /* DAI_CFG3 bit fields */
115 #define DA7210_DAI_FORMAT_I2SMODE (0 << 0)
116 #define DA7210_DAI_OE (1 << 3)
117 #define DA7210_DAI_EN (1 << 7)
119 /*PLL_DIV3 bit fields */
120 #define DA7210_MCLK_RANGE_10_20_MHZ (1 << 4)
121 #define DA7210_PLL_BYP (1 << 6)
124 #define DA7210_PLL_FS_MASK (0xF << 0)
125 #define DA7210_PLL_FS_8000 (0x1 << 0)
126 #define DA7210_PLL_FS_11025 (0x2 << 0)
127 #define DA7210_PLL_FS_12000 (0x3 << 0)
128 #define DA7210_PLL_FS_16000 (0x5 << 0)
129 #define DA7210_PLL_FS_22050 (0x6 << 0)
130 #define DA7210_PLL_FS_24000 (0x7 << 0)
131 #define DA7210_PLL_FS_32000 (0x9 << 0)
132 #define DA7210_PLL_FS_44100 (0xA << 0)
133 #define DA7210_PLL_FS_48000 (0xB << 0)
134 #define DA7210_PLL_FS_88200 (0xE << 0)
135 #define DA7210_PLL_FS_96000 (0xF << 0)
136 #define DA7210_PLL_EN (0x1 << 7)
138 #define DA7210_VERSION "0.0.1"
143 * max : 0x3F (+15.0 dB)
145 * min : 0x11 (-54.0 dB)
147 * reserved : 0x00 - 0x0F
151 * Reserved area are considered as "mute".
154 static const DECLARE_TLV_DB_SCALE(hp_out_tlv, -7950, 150, 1);
156 static const struct snd_kcontrol_new da7210_snd_controls[] = {
158 SOC_DOUBLE_R_TLV("HeadPhone Playback Volume",
159 DA7210_HP_L_VOL, DA7210_HP_R_VOL,
160 0, 0x3F, 0, hp_out_tlv),
163 /* Codec private data */
165 struct snd_soc_codec codec;
168 static struct snd_soc_codec *da7210_codec;
173 static const u8 da7210_reg[] = {
174 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* R0 - R7 */
175 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, /* R8 - RF */
176 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x10, 0x54, /* R10 - R17 */
177 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* R18 - R1F */
178 0x00, 0x00, 0x00, 0x02, 0x00, 0x76, 0x00, 0x00, /* R20 - R27 */
179 0x04, 0x00, 0x00, 0x30, 0x2A, 0x00, 0x40, 0x00, /* R28 - R2F */
180 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, /* R30 - R37 */
181 0x40, 0x00, 0x40, 0x00, 0x40, 0x00, 0x00, 0x00, /* R38 - R3F */
182 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* R40 - R4F */
183 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* R48 - R4F */
184 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* R50 - R57 */
185 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* R58 - R5F */
186 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* R60 - R67 */
187 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* R68 - R6F */
188 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* R70 - R77 */
189 0x00, 0x00, 0x00, 0x00, 0x00, 0x54, 0x54, 0x00, /* R78 - R7F */
190 0x00, 0x00, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, /* R80 - R87 */
195 * Read da7210 register cache
197 static inline u32 da7210_read_reg_cache(struct snd_soc_codec *codec, u32 reg)
199 u8 *cache = codec->reg_cache;
200 BUG_ON(reg >= ARRAY_SIZE(da7210_reg));
205 * Write to the da7210 register space
207 static int da7210_write(struct snd_soc_codec *codec, u32 reg, u32 value)
209 u8 *cache = codec->reg_cache;
212 BUG_ON(codec->volatile_register);
214 data[0] = reg & 0xff;
215 data[1] = value & 0xff;
217 if (reg >= codec->reg_cache_size)
220 if (2 != codec->hw_write(codec->control_data, data, 2))
228 * Read from the da7210 register space.
230 static inline u32 da7210_read(struct snd_soc_codec *codec, u32 reg)
232 if (DA7210_STATUS == reg)
233 return i2c_smbus_read_byte_data(codec->control_data, reg);
235 return da7210_read_reg_cache(codec, reg);
238 static int da7210_startup(struct snd_pcm_substream *substream,
239 struct snd_soc_dai *dai)
241 int is_play = substream->stream == SNDRV_PCM_STREAM_PLAYBACK;
242 struct snd_soc_codec *codec = dai->codec;
246 snd_soc_update_bits(codec, DA7210_OUTMIX_L, 0x1F, 0x10);
247 snd_soc_update_bits(codec, DA7210_OUTMIX_R, 0x1F, 0x10);
251 snd_soc_update_bits(codec, DA7210_MIC_L, 0x7, 0x7);
252 snd_soc_update_bits(codec, DA7210_MIC_R, 0x7, 0x7);
255 snd_soc_update_bits(codec, DA7210_INMIX_L, 0x1F, 0x1);
256 snd_soc_update_bits(codec, DA7210_INMIX_R, 0x1F, 0x1);
263 * Set PCM DAI word length.
265 static int da7210_hw_params(struct snd_pcm_substream *substream,
266 struct snd_pcm_hw_params *params,
267 struct snd_soc_dai *dai)
269 struct snd_soc_pcm_runtime *rtd = substream->private_data;
270 struct snd_soc_device *socdev = rtd->socdev;
271 struct snd_soc_codec *codec = socdev->card->codec;
273 u32 hpf_reg, hpf_mask, hpf_value;
276 /* set DAI source to Left and Right ADC */
277 da7210_write(codec, DA7210_DAI_SRC_SEL,
278 DA7210_DAI_OUT_R_SRC | DA7210_DAI_OUT_L_SRC);
281 da7210_write(codec, DA7210_DAI_CFG3, DA7210_DAI_OE | DA7210_DAI_EN);
283 dai_cfg1 = 0xFC & da7210_read(codec, DA7210_DAI_CFG1);
285 switch (params_format(params)) {
286 case SNDRV_PCM_FORMAT_S16_LE:
287 dai_cfg1 |= DA7210_DAI_WORD_S16_LE;
289 case SNDRV_PCM_FORMAT_S24_LE:
290 dai_cfg1 |= DA7210_DAI_WORD_S24_LE;
296 da7210_write(codec, DA7210_DAI_CFG1, dai_cfg1);
298 hpf_reg = (SNDRV_PCM_STREAM_PLAYBACK == substream->stream) ?
299 DA7210_DAC_HPF : DA7210_ADC_HPF;
301 switch (params_rate(params)) {
303 fs = DA7210_PLL_FS_8000;
304 hpf_mask = DA7210_VOICE_F0_MASK | DA7210_VOICE_EN;
305 hpf_value = DA7210_VOICE_F0_25 | DA7210_VOICE_EN;
306 bypass = DA7210_PLL_BYP;
309 fs = DA7210_PLL_FS_11025;
310 hpf_mask = DA7210_VOICE_F0_MASK | DA7210_VOICE_EN;
311 hpf_value = DA7210_VOICE_F0_25 | DA7210_VOICE_EN;
315 fs = DA7210_PLL_FS_12000;
316 hpf_mask = DA7210_VOICE_F0_MASK | DA7210_VOICE_EN;
317 hpf_value = DA7210_VOICE_F0_25 | DA7210_VOICE_EN;
318 bypass = DA7210_PLL_BYP;
321 fs = DA7210_PLL_FS_16000;
322 hpf_mask = DA7210_VOICE_F0_MASK | DA7210_VOICE_EN;
323 hpf_value = DA7210_VOICE_F0_25 | DA7210_VOICE_EN;
324 bypass = DA7210_PLL_BYP;
327 fs = DA7210_PLL_FS_22050;
328 hpf_mask = DA7210_VOICE_EN;
333 fs = DA7210_PLL_FS_32000;
334 hpf_mask = DA7210_VOICE_EN;
336 bypass = DA7210_PLL_BYP;
339 fs = DA7210_PLL_FS_44100;
340 hpf_mask = DA7210_VOICE_EN;
345 fs = DA7210_PLL_FS_48000;
346 hpf_mask = DA7210_VOICE_EN;
348 bypass = DA7210_PLL_BYP;
351 fs = DA7210_PLL_FS_88200;
352 hpf_mask = DA7210_VOICE_EN;
357 fs = DA7210_PLL_FS_96000;
358 hpf_mask = DA7210_VOICE_EN;
360 bypass = DA7210_PLL_BYP;
366 /* Disable active mode */
367 snd_soc_update_bits(codec, DA7210_STARTUP1, DA7210_SC_MST_EN, 0);
369 snd_soc_update_bits(codec, hpf_reg, hpf_mask, hpf_value);
370 snd_soc_update_bits(codec, DA7210_PLL, DA7210_PLL_FS_MASK, fs);
371 snd_soc_update_bits(codec, DA7210_PLL_DIV3, DA7210_PLL_BYP, bypass);
373 /* Enable active mode */
374 snd_soc_update_bits(codec, DA7210_STARTUP1,
375 DA7210_SC_MST_EN, DA7210_SC_MST_EN);
381 * Set DAI mode and Format
383 static int da7210_set_dai_fmt(struct snd_soc_dai *codec_dai, u32 fmt)
385 struct snd_soc_codec *codec = codec_dai->codec;
389 dai_cfg1 = 0x7f & da7210_read(codec, DA7210_DAI_CFG1);
390 dai_cfg3 = 0xfc & da7210_read(codec, DA7210_DAI_CFG3);
392 switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
393 case SND_SOC_DAIFMT_CBM_CFM:
394 dai_cfg1 |= DA7210_DAI_MODE_MASTER;
402 * It support I2S only now
404 switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
405 case SND_SOC_DAIFMT_I2S:
406 dai_cfg3 |= DA7210_DAI_FORMAT_I2SMODE;
414 * It support 64bit data transmission only now
416 dai_cfg1 |= DA7210_DAI_FLEN_64BIT;
418 da7210_write(codec, DA7210_DAI_CFG1, dai_cfg1);
419 da7210_write(codec, DA7210_DAI_CFG3, dai_cfg3);
424 #define DA7210_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE)
427 static struct snd_soc_dai_ops da7210_dai_ops = {
428 .startup = da7210_startup,
429 .hw_params = da7210_hw_params,
430 .set_fmt = da7210_set_dai_fmt,
433 struct snd_soc_dai da7210_dai = {
434 .name = "DA7210 IIS",
436 /* playback capabilities */
438 .stream_name = "Playback",
441 .rates = SNDRV_PCM_RATE_8000_96000,
442 .formats = DA7210_FORMATS,
444 /* capture capabilities */
446 .stream_name = "Capture",
449 .rates = SNDRV_PCM_RATE_8000_96000,
450 .formats = DA7210_FORMATS,
452 .ops = &da7210_dai_ops,
453 .symmetric_rates = 1,
455 EXPORT_SYMBOL_GPL(da7210_dai);
458 * Initialize the DA7210 driver
459 * register the mixer and dsp interfaces with the kernel
461 static int da7210_init(struct da7210_priv *da7210)
463 struct snd_soc_codec *codec = &da7210->codec;
467 dev_err(codec->dev, "Another da7210 is registered\n");
471 mutex_init(&codec->mutex);
472 INIT_LIST_HEAD(&codec->dapm_widgets);
473 INIT_LIST_HEAD(&codec->dapm_paths);
475 snd_soc_codec_set_drvdata(codec, da7210);
476 codec->name = "DA7210";
477 codec->owner = THIS_MODULE;
478 codec->read = da7210_read;
479 codec->write = da7210_write;
480 codec->dai = &da7210_dai;
482 codec->hw_write = (hw_write_t)i2c_master_send;
483 codec->reg_cache_size = ARRAY_SIZE(da7210_reg);
484 codec->reg_cache = kmemdup(da7210_reg,
485 sizeof(da7210_reg), GFP_KERNEL);
487 if (!codec->reg_cache)
490 da7210_dai.dev = codec->dev;
491 da7210_codec = codec;
493 ret = snd_soc_register_codec(codec);
495 dev_err(codec->dev, "Failed to register CODEC: %d\n", ret);
499 ret = snd_soc_register_dai(&da7210_dai);
501 dev_err(codec->dev, "Failed to register DAI: %d\n", ret);
507 * This driver use fixed value here
508 * And below settings expects MCLK = 12.288MHz
510 * When you select different MCLK, please check...
511 * DA7210_PLL_DIV1 val
512 * DA7210_PLL_DIV2 val
513 * DA7210_PLL_DIV3 val
514 * DA7210_PLL_DIV3 :: DA7210_MCLK_RANGExxx
518 * make sure that DA7210 use bypass mode before start up
520 da7210_write(codec, DA7210_STARTUP1, 0);
521 da7210_write(codec, DA7210_PLL_DIV3,
522 DA7210_MCLK_RANGE_10_20_MHZ | DA7210_PLL_BYP);
528 /* Enable Left & Right MIC PGA and Mic Bias */
529 da7210_write(codec, DA7210_MIC_L, DA7210_MIC_L_EN | DA7210_MICBIAS_EN);
530 da7210_write(codec, DA7210_MIC_R, DA7210_MIC_R_EN);
532 /* Enable Left and Right input PGA */
533 da7210_write(codec, DA7210_INMIX_L, DA7210_IN_L_EN);
534 da7210_write(codec, DA7210_INMIX_R, DA7210_IN_R_EN);
536 /* Enable Left and Right ADC */
537 da7210_write(codec, DA7210_ADC, DA7210_ADC_L_EN | DA7210_ADC_R_EN);
543 /* Enable Left and Right DAC */
544 da7210_write(codec, DA7210_DAC_SEL,
545 DA7210_DAC_L_SRC_DAI_L | DA7210_DAC_L_EN |
546 DA7210_DAC_R_SRC_DAI_R | DA7210_DAC_R_EN);
548 /* Enable Left and Right out PGA */
549 da7210_write(codec, DA7210_OUTMIX_L, DA7210_OUT_L_EN);
550 da7210_write(codec, DA7210_OUTMIX_R, DA7210_OUT_R_EN);
552 /* Enable Left and Right HeadPhone PGA */
553 da7210_write(codec, DA7210_HP_CFG,
554 DA7210_HP_2CAP_MODE | DA7210_HP_SENSE_EN |
555 DA7210_HP_L_EN | DA7210_HP_MODE | DA7210_HP_R_EN);
557 /* Diable PLL and bypass it */
558 da7210_write(codec, DA7210_PLL, DA7210_PLL_FS_48000);
561 * If 48kHz sound came, it use bypass mode,
562 * and when it is 44.1kHz, it use PLL.
564 * This time, this driver sets PLL always ON
565 * and controls bypass/PLL mode by switching
566 * DA7210_PLL_DIV3 :: DA7210_PLL_BYP bit.
567 * see da7210_hw_params
569 da7210_write(codec, DA7210_PLL_DIV1, 0xE5); /* MCLK = 12.288MHz */
570 da7210_write(codec, DA7210_PLL_DIV2, 0x99);
571 da7210_write(codec, DA7210_PLL_DIV3, 0x0A |
572 DA7210_MCLK_RANGE_10_20_MHZ | DA7210_PLL_BYP);
573 snd_soc_update_bits(codec, DA7210_PLL, DA7210_PLL_EN, DA7210_PLL_EN);
575 /* As suggested by Dialog */
576 da7210_write(codec, DA7210_A_HID_UNLOCK, 0x8B); /* unlock */
577 da7210_write(codec, DA7210_A_TEST_UNLOCK, 0xB4);
578 da7210_write(codec, DA7210_A_PLL1, 0x01);
579 da7210_write(codec, DA7210_A_CP_MODE, 0x7C);
580 da7210_write(codec, DA7210_A_HID_UNLOCK, 0x00); /* re-lock */
581 da7210_write(codec, DA7210_A_TEST_UNLOCK, 0x00);
583 /* Activate all enabled subsystem */
584 da7210_write(codec, DA7210_STARTUP1, DA7210_SC_MST_EN);
589 snd_soc_unregister_codec(codec);
591 kfree(codec->reg_cache);
592 codec->reg_cache = NULL;
598 #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
599 static int __devinit da7210_i2c_probe(struct i2c_client *i2c,
600 const struct i2c_device_id *id)
602 struct da7210_priv *da7210;
603 struct snd_soc_codec *codec;
606 da7210 = kzalloc(sizeof(struct da7210_priv), GFP_KERNEL);
610 codec = &da7210->codec;
611 codec->dev = &i2c->dev;
613 i2c_set_clientdata(i2c, da7210);
614 codec->control_data = i2c;
616 ret = da7210_init(da7210);
618 pr_err("Failed to initialise da7210 audio codec\n");
625 static int __devexit da7210_i2c_remove(struct i2c_client *client)
627 struct da7210_priv *da7210 = i2c_get_clientdata(client);
629 snd_soc_unregister_dai(&da7210_dai);
630 kfree(da7210->codec.reg_cache);
637 static const struct i2c_device_id da7210_i2c_id[] = {
641 MODULE_DEVICE_TABLE(i2c, da7210_i2c_id);
643 /* I2C codec control layer */
644 static struct i2c_driver da7210_i2c_driver = {
646 .name = "DA7210 I2C Codec",
647 .owner = THIS_MODULE,
649 .probe = da7210_i2c_probe,
650 .remove = __devexit_p(da7210_i2c_remove),
651 .id_table = da7210_i2c_id,
655 static int da7210_probe(struct platform_device *pdev)
657 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
658 struct snd_soc_codec *codec;
662 dev_err(&pdev->dev, "Codec device not registered\n");
666 socdev->card->codec = da7210_codec;
667 codec = da7210_codec;
670 ret = snd_soc_new_pcms(socdev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1);
674 snd_soc_add_controls(da7210_codec, da7210_snd_controls,
675 ARRAY_SIZE(da7210_snd_controls));
677 dev_info(&pdev->dev, "DA7210 Audio Codec %s\n", DA7210_VERSION);
683 static int da7210_remove(struct platform_device *pdev)
685 struct snd_soc_device *socdev = platform_get_drvdata(pdev);
687 snd_soc_free_pcms(socdev);
688 snd_soc_dapm_free(socdev);
693 struct snd_soc_codec_device soc_codec_dev_da7210 = {
694 .probe = da7210_probe,
695 .remove = da7210_remove,
697 EXPORT_SYMBOL_GPL(soc_codec_dev_da7210);
699 static int __init da7210_modinit(void)
702 #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
703 ret = i2c_add_driver(&da7210_i2c_driver);
707 module_init(da7210_modinit);
709 static void __exit da7210_exit(void)
711 #if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
712 i2c_del_driver(&da7210_i2c_driver);
715 module_exit(da7210_exit);
717 MODULE_DESCRIPTION("ASoC DA7210 driver");
718 MODULE_AUTHOR("David Chen, Kuninori Morimoto");
719 MODULE_LICENSE("GPL");