14 #include <linux/module.h>
19 #include <linux/i2c.h>
23 #include <linux/slab.h>
41 #define WM1811_JACKDET_MODE_NONE 0x0000
42 #define WM1811_JACKDET_MODE_JACK 0x0100
43 #define WM1811_JACKDET_MODE_MIC 0x0080
44 #define WM1811_JACKDET_MODE_AUDIO 0x0180
46 #define WM8994_NUM_DRC 3
47 #define WM8994_NUM_EQ 3
52 } wm8994_vu_bits[] = {
82 static int wm8994_drc_base[] = {
88 static int wm8994_retune_mobile_base[] = {
97 { 32768,
true, 1, 4 },
98 { 32768,
false, 1, 1 },
99 { 44100 * 256,
true, 7, 10 },
100 { 44100 * 256,
false, 7, 10 },
104 { 32768,
true, 0, 1 },
105 { 32768,
false, 0, 1 },
106 { 44100 * 256,
true, 10, 10 },
107 { 44100 * 256,
false, 7, 8 },
118 if (!(wm8994->
pdata && wm8994->
pdata->micd_rates) &&
119 wm8994->
jack_cb != wm8958_default_micdet)
126 sysclk = wm8994->
aifclk[1];
128 sysclk = wm8994->
aifclk[0];
130 if (wm8994->
pdata && wm8994->
pdata->micd_rates) {
131 rates = wm8994->
pdata->micd_rates;
132 num_rates = wm8994->
pdata->num_micd_rates;
134 rates = jackdet_rates;
137 rates = micdet_rates;
142 for (i = 0; i < num_rates; i++) {
143 if (rates[i].idle != idle)
145 if (
abs(rates[i].sysclk - sysclk) <
146 abs(rates[best].sysclk - sysclk))
148 else if (rates[best].idle != idle)
155 dev_dbg(codec->
dev,
"MICD rate %d,%d for %dHz %s\n",
156 rates[best].
start, rates[best].
rate, sysclk,
157 idle ?
"idle" :
"active");
164 static int configure_aif_clock(
struct snd_soc_codec *codec,
int aif)
166 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
176 switch (wm8994->
sysclk[aif]) {
178 rate = wm8994->
mclk[0];
183 rate = wm8994->
mclk[1];
188 rate = wm8994->
fll[0].out;
193 rate = wm8994->
fll[1].out;
200 if (rate >= 13500000) {
204 dev_dbg(codec->
dev,
"Dividing AIF%d clock to %dHz\n",
219 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
223 configure_aif_clock(codec, 0);
224 configure_aif_clock(codec, 1);
234 wm8958_micd_set_rate(codec);
244 WM8994_SYSCLK_SRC,
new);
248 wm8958_micd_set_rate(codec);
260 if (reg & WM8994_SYSCLK_SRC)
268 static const char *sidetone_hpf_text[] = {
269 "2.7kHz",
"1.35kHz",
"675Hz",
"370Hz",
"180Hz",
"90Hz",
"45Hz"
272 static const struct soc_enum sidetone_hpf =
275 static const char *adc_hpf_text[] = {
276 "HiFi",
"Voice 1",
"Voice 2",
"Voice 3"
279 static const struct soc_enum aif1adc1_hpf =
282 static const struct soc_enum aif1adc2_hpf =
285 static const struct soc_enum aif2adc_hpf =
296 #define WM8994_DRC_SWITCH(xname, reg, shift) \
297 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
298 .info = snd_soc_info_volsw, .get = snd_soc_get_volsw,\
299 .put = wm8994_put_drc_sw, \
300 .private_value = SOC_SINGLE_VALUE(reg, shift, 1, 0) }
302 static int wm8994_put_drc_sw(
struct snd_kcontrol *kcontrol,
328 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
330 int base = wm8994_drc_base[
drc];
349 static int wm8994_get_drc(
const char *
name)
351 if (
strcmp(name,
"AIF1DRC1 Mode") == 0)
353 if (
strcmp(name,
"AIF1DRC2 Mode") == 0)
355 if (
strcmp(name,
"AIF2DRC Mode") == 0)
360 static int wm8994_put_drc_enum(
struct snd_kcontrol *kcontrol,
364 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
366 int drc = wm8994_get_drc(kcontrol->
id.name);
377 wm8994_set_drc(codec, drc);
382 static int wm8994_get_drc_enum(
struct snd_kcontrol *kcontrol,
386 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
387 int drc = wm8994_get_drc(kcontrol->
id.name);
396 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
398 int base = wm8994_retune_mobile_base[
block];
399 int iface, best, best_val, save,
i,
cfg;
425 - wm8994->
dac_rates[iface]) < best_val) {
432 dev_dbg(codec->
dev,
"ReTune Mobile %d %s/%dHz for %dHz sample rate\n",
452 static int wm8994_get_retune_mobile_block(
const char *name)
454 if (
strcmp(name,
"AIF1.1 EQ Mode") == 0)
456 if (
strcmp(name,
"AIF1.2 EQ Mode") == 0)
458 if (
strcmp(name,
"AIF2 EQ Mode") == 0)
463 static int wm8994_put_retune_mobile_enum(
struct snd_kcontrol *kcontrol,
467 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
469 int block = wm8994_get_retune_mobile_block(kcontrol->
id.name);
470 int value = ucontrol->
value.integer.value[0];
480 wm8994_set_retune_mobile(codec, block);
485 static int wm8994_get_retune_mobile_enum(
struct snd_kcontrol *kcontrol,
489 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
490 int block = wm8994_get_retune_mobile_block(kcontrol->
id.name);
497 static const char *aif_chan_src_text[] = {
501 static const struct soc_enum aif1adcl_src =
504 static const struct soc_enum aif1adcr_src =
507 static const struct soc_enum aif2adcl_src =
510 static const struct soc_enum aif2adcr_src =
513 static const struct soc_enum aif1dacl_src =
516 static const struct soc_enum aif1dacr_src =
519 static const struct soc_enum aif2dacl_src =
522 static const struct soc_enum aif2dacr_src =
525 static const char *osr_text[] = {
526 "Low Power",
"High Performance",
529 static const struct soc_enum dac_osr =
532 static const struct soc_enum adc_osr =
538 1, 119, 0, digital_tlv),
541 1, 119, 0, digital_tlv),
544 1, 119, 0, digital_tlv),
546 SOC_ENUM(
"AIF1ADCL Source", aif1adcl_src),
547 SOC_ENUM(
"AIF1ADCR Source", aif1adcr_src),
548 SOC_ENUM(
"AIF2ADCL Source", aif2adcl_src),
549 SOC_ENUM(
"AIF2ADCR Source", aif2adcr_src),
551 SOC_ENUM(
"AIF1DACL Source", aif1dacl_src),
552 SOC_ENUM(
"AIF1DACR Source", aif1dacr_src),
553 SOC_ENUM(
"AIF2DACL Source", aif2dacl_src),
554 SOC_ENUM(
"AIF2DACR Source", aif2dacr_src),
590 SOC_ENUM(
"Sidetone HPF Mux", sidetone_hpf),
593 SOC_ENUM(
"AIF1ADC1 HPF Mode", aif1adc1_hpf),
596 SOC_ENUM(
"AIF1ADC2 HPF Mode", aif1adc2_hpf),
599 SOC_ENUM(
"AIF2ADC HPF Mode", aif2adc_hpf),
616 6, 1, 1, wm_hubs_spkmix_tlv),
618 2, 1, 1, wm_hubs_spkmix_tlv),
621 6, 1, 1, wm_hubs_spkmix_tlv),
623 2, 1, 1, wm_hubs_spkmix_tlv),
626 10, 15, 0, wm8994_3d_tlv),
630 10, 15, 0, wm8994_3d_tlv),
634 10, 15, 0, wm8994_3d_tlv),
686 static const char *wm8958_ng_text[] = {
687 "30ms",
"125ms",
"250ms",
"500ms",
690 static const struct soc_enum wm8958_aif1dac1_ng_hold =
694 static const struct soc_enum wm8958_aif1dac2_ng_hold =
698 static const struct soc_enum wm8958_aif2dac_ng_hold =
707 SOC_ENUM(
"AIF1DAC1 Noise Gate Hold Time", wm8958_aif1dac1_ng_hold),
714 SOC_ENUM(
"AIF1DAC2 Noise Gate Hold Time", wm8958_aif1dac2_ng_hold),
721 SOC_ENUM(
"AIF2DAC Noise Gate Hold Time", wm8958_aif2dac_ng_hold),
737 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
760 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
766 dev_dbg(codec->
dev,
"Active refcount incremented, now %d\n",
777 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
784 dev_dbg(codec->
dev,
"Active refcount decremented, now %d\n",
794 wm1811_jackdet_set_mode(codec, mode);
804 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
808 return configure_clock(codec);
826 configure_clock(codec);
835 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
837 pm_runtime_get_sync(codec->
dev);
841 dev_dbg(codec->
dev,
"Referencing VMID, refcount is now %d\n",
913 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
917 dev_dbg(codec->
dev,
"Dereferencing VMID, refcount is now %d\n",
921 if (wm8994->
hubs.lineout1_se)
928 if (wm8994->
hubs.lineout2_se)
985 pm_runtime_put(codec->
dev);
995 vmid_reference(codec);
999 vmid_dereference(codec);
1006 static bool wm8994_check_class_w_digital(
struct snd_soc_codec *codec)
1019 dev_vdbg(codec->
dev,
"Class W source AIF1DAC2\n");
1023 dev_vdbg(codec->
dev,
"Class W source AIF1DAC1\n");
1027 dev_vdbg(codec->
dev,
"DAC mixer setting: %x\n", reg);
1033 dev_vdbg(codec->
dev,
"Left and right DAC mixers different\n");
1048 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
1056 switch (control->
type) {
1075 else if (!(val & WM8994_AIF1ADCL_SRC) &&
1076 !(val & WM8994_AIF1ADCR_SRC))
1086 else if (!(val & WM8994_AIF1DACL_SRC) &&
1087 !(val & WM8994_AIF1DACR_SRC))
1115 for (i = 0; i <
ARRAY_SIZE(wm8994_vu_bits); i++)
1118 wm8994_vu_bits[i].reg));
1157 else if (!(val & WM8994_AIF2ADCL_SRC) &&
1158 !(val & WM8994_AIF2ADCR_SRC))
1168 else if (!(val & WM8994_AIF2DACL_SRC) &&
1169 !(val & WM8994_AIF2DACR_SRC))
1198 for (i = 0; i <
ARRAY_SIZE(wm8994_vu_bits); i++)
1201 wm8994_vu_bits[i].reg));
1231 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
1249 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
1267 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
1300 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
1327 late_enable_ev(w, kcontrol, event);
1334 late_enable_ev(w, kcontrol, event);
1342 unsigned int mask = 1 << w->
shift;
1349 static const char *adc_mux_text[] = {
1354 static const struct soc_enum adc_enum =
1444 #define WM8994_CLASS_W_SWITCH(xname, reg, shift, max, invert) \
1445 { .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
1446 .info = snd_soc_info_volsw, \
1447 .get = snd_soc_dapm_get_volsw, .put = wm8994_put_class_w, \
1448 .private_value = SOC_SINGLE_VALUE(reg, shift, max, invert) }
1450 static int wm8994_put_class_w(
struct snd_kcontrol *kcontrol,
1491 static const char *sidetone_text[] = {
1492 "ADC/DMIC1",
"DMIC2",
1495 static const struct soc_enum sidetone1_enum =
1501 static const struct soc_enum sidetone2_enum =
1507 static const char *aif1dac_text[] = {
1508 "AIF1DACDAT",
"AIF3DACDAT",
1511 static const struct soc_enum aif1dac_enum =
1517 static const char *aif2dac_text[] = {
1518 "AIF2DACDAT",
"AIF3DACDAT",
1521 static const struct soc_enum aif2dac_enum =
1527 static const char *aif2adc_text[] = {
1528 "AIF2ADCDAT",
"AIF3DACDAT",
1531 static const struct soc_enum aif2adc_enum =
1537 static const char *aif3adc_text[] = {
1538 "AIF1ADCDAT",
"AIF2ADCDAT",
"AIF2DACDAT",
"Mono PCM",
1541 static const struct soc_enum wm8994_aif3adc_enum =
1547 static const struct soc_enum wm8958_aif3adc_enum =
1553 static const char *mono_pcm_out_text[] = {
1554 "None",
"AIF2ADCL",
"AIF2ADCR",
1557 static const struct soc_enum mono_pcm_out_enum =
1563 static const char *aif2dac_src_text[] = {
1568 static const struct soc_enum aif2dacl_src_enum =
1574 static const struct soc_enum aif2dacr_src_enum =
1598 left_speaker_mixer,
ARRAY_SIZE(left_speaker_mixer),
1601 right_speaker_mixer,
ARRAY_SIZE(right_speaker_mixer),
1620 left_speaker_mixer,
ARRAY_SIZE(left_speaker_mixer)),
1622 right_speaker_mixer,
ARRAY_SIZE(right_speaker_mixer)),
1773 {
"CLK_SYS",
NULL,
"AIF1CLK", check_clk_sys },
1774 {
"CLK_SYS",
NULL,
"AIF2CLK", check_clk_sys },
1776 {
"DSP1CLK",
NULL,
"CLK_SYS" },
1777 {
"DSP2CLK",
NULL,
"CLK_SYS" },
1778 {
"DSPINTCLK",
NULL,
"CLK_SYS" },
1780 {
"AIF1ADC1L",
NULL,
"AIF1CLK" },
1781 {
"AIF1ADC1L",
NULL,
"DSP1CLK" },
1782 {
"AIF1ADC1R",
NULL,
"AIF1CLK" },
1783 {
"AIF1ADC1R",
NULL,
"DSP1CLK" },
1784 {
"AIF1ADC1R",
NULL,
"DSPINTCLK" },
1786 {
"AIF1DAC1L",
NULL,
"AIF1CLK" },
1787 {
"AIF1DAC1L",
NULL,
"DSP1CLK" },
1788 {
"AIF1DAC1R",
NULL,
"AIF1CLK" },
1789 {
"AIF1DAC1R",
NULL,
"DSP1CLK" },
1790 {
"AIF1DAC1R",
NULL,
"DSPINTCLK" },
1792 {
"AIF1ADC2L",
NULL,
"AIF1CLK" },
1793 {
"AIF1ADC2L",
NULL,
"DSP1CLK" },
1794 {
"AIF1ADC2R",
NULL,
"AIF1CLK" },
1795 {
"AIF1ADC2R",
NULL,
"DSP1CLK" },
1796 {
"AIF1ADC2R",
NULL,
"DSPINTCLK" },
1798 {
"AIF1DAC2L",
NULL,
"AIF1CLK" },
1799 {
"AIF1DAC2L",
NULL,
"DSP1CLK" },
1800 {
"AIF1DAC2R",
NULL,
"AIF1CLK" },
1801 {
"AIF1DAC2R",
NULL,
"DSP1CLK" },
1802 {
"AIF1DAC2R",
NULL,
"DSPINTCLK" },
1804 {
"AIF2ADCL",
NULL,
"AIF2CLK" },
1805 {
"AIF2ADCL",
NULL,
"DSP2CLK" },
1806 {
"AIF2ADCR",
NULL,
"AIF2CLK" },
1807 {
"AIF2ADCR",
NULL,
"DSP2CLK" },
1808 {
"AIF2ADCR",
NULL,
"DSPINTCLK" },
1810 {
"AIF2DACL",
NULL,
"AIF2CLK" },
1811 {
"AIF2DACL",
NULL,
"DSP2CLK" },
1812 {
"AIF2DACR",
NULL,
"AIF2CLK" },
1813 {
"AIF2DACR",
NULL,
"DSP2CLK" },
1814 {
"AIF2DACR",
NULL,
"DSPINTCLK" },
1816 {
"DMIC1L",
NULL,
"DMIC1DAT" },
1817 {
"DMIC1L",
NULL,
"CLK_SYS" },
1818 {
"DMIC1R",
NULL,
"DMIC1DAT" },
1819 {
"DMIC1R",
NULL,
"CLK_SYS" },
1820 {
"DMIC2L",
NULL,
"DMIC2DAT" },
1821 {
"DMIC2L",
NULL,
"CLK_SYS" },
1822 {
"DMIC2R",
NULL,
"DMIC2DAT" },
1823 {
"DMIC2R",
NULL,
"CLK_SYS" },
1825 {
"ADCL",
NULL,
"AIF1CLK" },
1826 {
"ADCL",
NULL,
"DSP1CLK" },
1827 {
"ADCL",
NULL,
"DSPINTCLK" },
1829 {
"ADCR",
NULL,
"AIF1CLK" },
1830 {
"ADCR",
NULL,
"DSP1CLK" },
1831 {
"ADCR",
NULL,
"DSPINTCLK" },
1833 {
"ADCL Mux",
"ADC",
"ADCL" },
1834 {
"ADCL Mux",
"DMIC",
"DMIC1L" },
1835 {
"ADCR Mux",
"ADC",
"ADCR" },
1836 {
"ADCR Mux",
"DMIC",
"DMIC1R" },
1838 {
"DAC1L",
NULL,
"AIF1CLK" },
1839 {
"DAC1L",
NULL,
"DSP1CLK" },
1840 {
"DAC1L",
NULL,
"DSPINTCLK" },
1842 {
"DAC1R",
NULL,
"AIF1CLK" },
1843 {
"DAC1R",
NULL,
"DSP1CLK" },
1844 {
"DAC1R",
NULL,
"DSPINTCLK" },
1846 {
"DAC2L",
NULL,
"AIF2CLK" },
1847 {
"DAC2L",
NULL,
"DSP2CLK" },
1848 {
"DAC2L",
NULL,
"DSPINTCLK" },
1850 {
"DAC2R",
NULL,
"AIF2DACR" },
1851 {
"DAC2R",
NULL,
"AIF2CLK" },
1852 {
"DAC2R",
NULL,
"DSP2CLK" },
1853 {
"DAC2R",
NULL,
"DSPINTCLK" },
1855 {
"TOCLK",
NULL,
"CLK_SYS" },
1857 {
"AIF1DACDAT",
NULL,
"AIF1 Playback" },
1858 {
"AIF2DACDAT",
NULL,
"AIF2 Playback" },
1859 {
"AIF3DACDAT",
NULL,
"AIF3 Playback" },
1861 {
"AIF1 Capture",
NULL,
"AIF1ADCDAT" },
1862 {
"AIF2 Capture",
NULL,
"AIF2ADCDAT" },
1863 {
"AIF3 Capture",
NULL,
"AIF3ADCDAT" },
1866 {
"AIF1ADC1L",
NULL,
"AIF1ADC1L Mixer" },
1867 {
"AIF1ADC1L Mixer",
"ADC/DMIC Switch",
"ADCL Mux" },
1868 {
"AIF1ADC1L Mixer",
"AIF2 Switch",
"AIF2DACL" },
1870 {
"AIF1ADC1R",
NULL,
"AIF1ADC1R Mixer" },
1871 {
"AIF1ADC1R Mixer",
"ADC/DMIC Switch",
"ADCR Mux" },
1872 {
"AIF1ADC1R Mixer",
"AIF2 Switch",
"AIF2DACR" },
1874 {
"AIF1ADC2L",
NULL,
"AIF1ADC2L Mixer" },
1875 {
"AIF1ADC2L Mixer",
"DMIC Switch",
"DMIC2L" },
1876 {
"AIF1ADC2L Mixer",
"AIF2 Switch",
"AIF2DACL" },
1878 {
"AIF1ADC2R",
NULL,
"AIF1ADC2R Mixer" },
1879 {
"AIF1ADC2R Mixer",
"DMIC Switch",
"DMIC2R" },
1880 {
"AIF1ADC2R Mixer",
"AIF2 Switch",
"AIF2DACR" },
1883 {
"AIF1DAC1L",
NULL,
"AIF1DAC Mux" },
1884 {
"AIF1DAC1R",
NULL,
"AIF1DAC Mux" },
1885 {
"AIF1DAC2L",
NULL,
"AIF1DAC Mux" },
1886 {
"AIF1DAC2R",
NULL,
"AIF1DAC Mux" },
1888 {
"AIF1DAC Mux",
"AIF1DACDAT",
"AIF1DACDAT" },
1889 {
"AIF1DAC Mux",
"AIF3DACDAT",
"AIF3DACDAT" },
1890 {
"AIF2DAC Mux",
"AIF2DACDAT",
"AIF2DACDAT" },
1891 {
"AIF2DAC Mux",
"AIF3DACDAT",
"AIF3DACDAT" },
1892 {
"AIF2ADC Mux",
"AIF2ADCDAT",
"AIF2ADCL" },
1893 {
"AIF2ADC Mux",
"AIF2ADCDAT",
"AIF2ADCR" },
1894 {
"AIF2ADC Mux",
"AIF3DACDAT",
"AIF3ADCDAT" },
1897 {
"DAC1L Mixer",
"AIF2 Switch",
"AIF2DACL" },
1898 {
"DAC1L Mixer",
"AIF1.2 Switch",
"AIF1DAC2L" },
1899 {
"DAC1L Mixer",
"AIF1.1 Switch",
"AIF1DAC1L" },
1900 {
"DAC1L Mixer",
"Left Sidetone Switch",
"Left Sidetone" },
1901 {
"DAC1L Mixer",
"Right Sidetone Switch",
"Right Sidetone" },
1903 {
"DAC1R Mixer",
"AIF2 Switch",
"AIF2DACR" },
1904 {
"DAC1R Mixer",
"AIF1.2 Switch",
"AIF1DAC2R" },
1905 {
"DAC1R Mixer",
"AIF1.1 Switch",
"AIF1DAC1R" },
1906 {
"DAC1R Mixer",
"Left Sidetone Switch",
"Left Sidetone" },
1907 {
"DAC1R Mixer",
"Right Sidetone Switch",
"Right Sidetone" },
1910 {
"AIF2ADCL",
NULL,
"AIF2DAC2L Mixer" },
1911 {
"AIF2DAC2L Mixer",
"AIF2 Switch",
"AIF2DACL" },
1912 {
"AIF2DAC2L Mixer",
"AIF1.2 Switch",
"AIF1DAC2L" },
1913 {
"AIF2DAC2L Mixer",
"AIF1.1 Switch",
"AIF1DAC1L" },
1914 {
"AIF2DAC2L Mixer",
"Left Sidetone Switch",
"Left Sidetone" },
1915 {
"AIF2DAC2L Mixer",
"Right Sidetone Switch",
"Right Sidetone" },
1917 {
"AIF2ADCR",
NULL,
"AIF2DAC2R Mixer" },
1918 {
"AIF2DAC2R Mixer",
"AIF2 Switch",
"AIF2DACR" },
1919 {
"AIF2DAC2R Mixer",
"AIF1.2 Switch",
"AIF1DAC2R" },
1920 {
"AIF2DAC2R Mixer",
"AIF1.1 Switch",
"AIF1DAC1R" },
1921 {
"AIF2DAC2R Mixer",
"Left Sidetone Switch",
"Left Sidetone" },
1922 {
"AIF2DAC2R Mixer",
"Right Sidetone Switch",
"Right Sidetone" },
1924 {
"AIF1ADCDAT",
NULL,
"AIF1ADC1L" },
1925 {
"AIF1ADCDAT",
NULL,
"AIF1ADC1R" },
1926 {
"AIF1ADCDAT",
NULL,
"AIF1ADC2L" },
1927 {
"AIF1ADCDAT",
NULL,
"AIF1ADC2R" },
1929 {
"AIF2ADCDAT",
NULL,
"AIF2ADC Mux" },
1932 {
"AIF3ADCDAT",
"AIF1ADCDAT",
"AIF1ADC1L" },
1933 {
"AIF3ADCDAT",
"AIF1ADCDAT",
"AIF1ADC1R" },
1934 {
"AIF3ADCDAT",
"AIF1ADCDAT",
"AIF1ADC2L" },
1935 {
"AIF3ADCDAT",
"AIF1ADCDAT",
"AIF1ADC2R" },
1936 {
"AIF3ADCDAT",
"AIF2ADCDAT",
"AIF2ADCL" },
1937 {
"AIF3ADCDAT",
"AIF2ADCDAT",
"AIF2ADCR" },
1938 {
"AIF3ADCDAT",
"AIF2DACDAT",
"AIF2DACL" },
1939 {
"AIF3ADCDAT",
"AIF2DACDAT",
"AIF2DACR" },
1942 {
"Left Sidetone",
"ADC/DMIC1",
"ADCL Mux" },
1943 {
"Left Sidetone",
"DMIC2",
"DMIC2L" },
1944 {
"Right Sidetone",
"ADC/DMIC1",
"ADCR Mux" },
1945 {
"Right Sidetone",
"DMIC2",
"DMIC2R" },
1948 {
"Left Output Mixer",
"DAC Switch",
"DAC1L" },
1949 {
"Right Output Mixer",
"DAC Switch",
"DAC1R" },
1951 {
"SPKL",
"DAC1 Switch",
"DAC1L" },
1952 {
"SPKL",
"DAC2 Switch",
"DAC2L" },
1954 {
"SPKR",
"DAC1 Switch",
"DAC1R" },
1955 {
"SPKR",
"DAC2 Switch",
"DAC2R" },
1957 {
"Left Headphone Mux",
"DAC",
"DAC1L" },
1958 {
"Right Headphone Mux",
"DAC",
"DAC1R" },
1962 {
"DAC1L",
NULL,
"Late DAC1L Enable PGA" },
1963 {
"Late DAC1L Enable PGA",
NULL,
"DAC1L Mixer" },
1964 {
"DAC1R",
NULL,
"Late DAC1R Enable PGA" },
1965 {
"Late DAC1R Enable PGA",
NULL,
"DAC1R Mixer" },
1966 {
"DAC2L",
NULL,
"Late DAC2L Enable PGA" },
1967 {
"Late DAC2L Enable PGA",
NULL,
"AIF2DAC2L Mixer" },
1968 {
"DAC2R",
NULL,
"Late DAC2R Enable PGA" },
1969 {
"Late DAC2R Enable PGA",
NULL,
"AIF2DAC2R Mixer" }
1973 {
"DAC1L",
NULL,
"DAC1L Mixer" },
1974 {
"DAC1R",
NULL,
"DAC1R Mixer" },
1975 {
"DAC2L",
NULL,
"AIF2DAC2L Mixer" },
1976 {
"DAC2R",
NULL,
"AIF2DAC2R Mixer" },
1980 {
"AIF1DACDAT",
NULL,
"AIF2DACDAT" },
1981 {
"AIF2DACDAT",
NULL,
"AIF1DACDAT" },
1982 {
"AIF1ADCDAT",
NULL,
"AIF2ADCDAT" },
1983 {
"AIF2ADCDAT",
NULL,
"AIF1ADCDAT" },
1984 {
"MICBIAS1",
NULL,
"CLK_SYS" },
1985 {
"MICBIAS1",
NULL,
"MICBIAS Supply" },
1986 {
"MICBIAS2",
NULL,
"CLK_SYS" },
1987 {
"MICBIAS2",
NULL,
"MICBIAS Supply" },
1991 {
"AIF2DACL",
NULL,
"AIF2DAC Mux" },
1992 {
"AIF2DACR",
NULL,
"AIF2DAC Mux" },
1993 {
"MICBIAS1",
NULL,
"VMID" },
1994 {
"MICBIAS2",
NULL,
"VMID" },
1998 {
"AIF2DACL",
NULL,
"AIF2DACL Mux" },
1999 {
"AIF2DACR",
NULL,
"AIF2DACR Mux" },
2001 {
"AIF2DACL Mux",
"AIF2",
"AIF2DAC Mux" },
2002 {
"AIF2DACL Mux",
"AIF3",
"AIF3DACDAT" },
2003 {
"AIF2DACR Mux",
"AIF2",
"AIF2DAC Mux" },
2004 {
"AIF2DACR Mux",
"AIF3",
"AIF3DACDAT" },
2006 {
"AIF3DACDAT",
NULL,
"AIF3" },
2007 {
"AIF3ADCDAT",
NULL,
"AIF3" },
2009 {
"Mono PCM Out Mux",
"AIF2ADCL",
"AIF2ADCL" },
2010 {
"Mono PCM Out Mux",
"AIF2ADCR",
"AIF2ADCR" },
2012 {
"AIF3ADC Mux",
"Mono PCM",
"Mono PCM Out Mux" },
2017 #define FIXED_FLL_SIZE ((1 << 16) * 10)
2027 static int wm8994_get_fll_config(
struct fll_div *fll,
2028 int freq_in,
int freq_out)
2031 unsigned int K, Ndiv, Nmod;
2033 pr_debug(
"FLL input=%dHz, output=%dHz\n", freq_in, freq_out);
2037 while (freq_in > 13500000) {
2048 while (freq_out * (fll->
outdiv + 1) < 90000000) {
2053 freq_out *= fll->
outdiv + 1;
2056 if (freq_in > 1000000) {
2058 }
else if (freq_in > 256000) {
2061 }
else if (freq_in > 128000) {
2064 }
else if (freq_in > 64000) {
2074 Ndiv = freq_out / freq_in;
2077 Nmod = freq_out % freq_in;
2085 K = Kpart & 0xFFFFFFFF;
2099 unsigned int freq_in,
unsigned int freq_out)
2101 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
2102 struct wm8994 *control = wm8994->
wm8994;
2103 int reg_offset,
ret;
2105 u16 reg, clk1, aif_reg, aif_src;
2132 src = wm8994->
fll[
id].src;
2141 freq_out = 12000000;
2148 if (wm8994->
fll[
id].src == src &&
2149 wm8994->
fll[
id].in == freq_in && wm8994->
fll[
id].out == freq_out)
2157 ret = wm8994_get_fll_config(&fll, freq_in, freq_out);
2159 ret = wm8994_get_fll_config(&fll, wm8994->
fll[
id].in,
2160 wm8994->
fll[
id].out);
2166 if (clk1 & WM8994_SYSCLK_SRC)
2174 dev_err(codec->
dev,
"FLL%d is currently providing SYSCLK\n",
2181 WM8994_FLL1_ENA, 0);
2184 freq_in == freq_out && freq_out) {
2185 dev_dbg(codec->
dev,
"Bypassing FLL%d\n",
id + 1);
2220 active_reference(codec);
2222 switch (control->
type) {
2224 vmid_reference(codec);
2228 vmid_reference(codec);
2251 "Timed out waiting for FLL lock\n");
2257 switch (control->
type) {
2259 vmid_dereference(codec);
2263 vmid_dereference(codec);
2269 active_dereference(codec);
2274 wm8994->
fll[
id].in = freq_in;
2275 wm8994->
fll[
id].out = freq_out;
2278 configure_clock(codec);
2292 static int opclk_divs[] = { 10, 20, 30, 40, 55, 60, 80, 120, 160 };
2294 static int wm8994_set_fll(
struct snd_soc_dai *
dai,
int id,
int src,
2295 unsigned int freq_in,
unsigned int freq_out)
2297 return _wm8994_set_fll(dai->
codec,
id, src, freq_in, freq_out);
2301 int clk_id,
unsigned int freq,
int dir)
2304 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
2321 dev_dbg(dai->
dev,
"AIF%d using MCLK1 at %uHz\n",
2329 dev_dbg(dai->
dev,
"AIF%d using MCLK2 at %uHz\n",
2349 if (opclk_divs[i] == freq)
2366 configure_clock(codec);
2371 static int wm8994_set_bias_level(
struct snd_soc_codec *codec,
2374 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
2375 struct wm8994 *control = wm8994->
wm8994;
2385 switch (control->
type) {
2398 active_reference(codec);
2403 switch (control->
type) {
2427 active_dereference(codec);
2430 switch (control->
type) {
2458 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
2462 if (wm8994->
hubs.lineout1_se) {
2464 "LINEOUT1N Driver");
2466 "LINEOUT1P Driver");
2468 if (wm8994->
hubs.lineout2_se) {
2470 "LINEOUT2N Driver");
2472 "LINEOUT2P Driver");
2481 if (wm8994->
hubs.lineout1_se) {
2483 "LINEOUT1N Driver");
2485 "LINEOUT1P Driver");
2487 if (wm8994->
hubs.lineout2_se) {
2489 "LINEOUT2N Driver");
2491 "LINEOUT2P Driver");
2505 static int wm8994_set_dai_fmt(
struct snd_soc_dai *dai,
unsigned int fmt)
2508 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
2509 struct wm8994 *control = wm8994->
wm8994;
2556 switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
2574 switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
2596 switch (control->
type) {
2635 static int fs_ratios[] = {
2636 64, 128, 192, 256, 348, 512, 768, 1024, 1408, 1536
2639 static int bclk_divs[] = {
2640 10, 15, 20, 30, 40, 50, 60, 80, 110, 120, 160, 220, 240, 320, 440, 480,
2641 640, 880, 960, 1280, 1760, 1920
2649 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
2660 int id = dai->
id - 1;
2662 int i, cur_val, best_val, bclk_rate, best;
2675 dev_dbg(codec->
dev,
"AIF1 using split LRCLK\n");
2688 dev_dbg(codec->
dev,
"AIF2 using split LRCLK\n");
2735 dev_dbg(dai->
dev,
"Sample rate is %dHz\n", srs[i].rate);
2736 dev_dbg(dai->
dev,
"AIF%dCLK is %dHz, target BCLK %dHz\n",
2737 dai->
id, wm8994->
aifclk[
id], bclk_rate);
2743 if (wm8994->
aifclk[
id] == 0) {
2744 dev_err(dai->
dev,
"AIF%dCLK not configured\n", dai->
id);
2752 for (i = 1; i <
ARRAY_SIZE(fs_ratios); i++) {
2755 if (cur_val >= best_val)
2760 dev_dbg(dai->
dev,
"Selected AIF%dCLK/fs = %d\n",
2761 dai->
id, fs_ratios[best]);
2770 for (i = 0; i <
ARRAY_SIZE(bclk_divs); i++) {
2771 cur_val = (wm8994->
aifclk[
id] * 10 / bclk_divs[
i]) - bclk_rate;
2776 bclk_rate = wm8994->
aifclk[
id] * 10 / bclk_divs[best];
2777 dev_dbg(dai->
dev,
"Using BCLK_DIV %d for actual BCLK %dHz\n",
2778 bclk_divs[best], bclk_rate);
2783 dev_err(dai->
dev,
"Unable to generate LRCLK from %dHz BCLK\n",
2787 dev_dbg(dai->
dev,
"Using LRCLK rate %d for actual LRCLK %dHz\n",
2788 lrclk, bclk_rate / lrclk);
2802 wm8994_set_retune_mobile(codec, 0);
2803 wm8994_set_retune_mobile(codec, 1);
2807 wm8994_set_retune_mobile(codec, 2);
2820 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
2821 struct wm8994 *control = wm8994->
wm8994;
2827 switch (control->
type) {
2864 switch (codec_dai->
id) {
2890 switch (codec_dai->
id) {
2911 static int wm8994_aif2_probe(
struct snd_soc_dai *dai)
2926 #define WM8994_RATES SNDRV_PCM_RATE_8000_96000
2928 #define WM8994_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |\
2929 SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE)
2932 .set_sysclk = wm8994_set_dai_sysclk,
2933 .set_fmt = wm8994_set_dai_fmt,
2934 .hw_params = wm8994_hw_params,
2935 .digital_mute = wm8994_aif_mute,
2936 .set_pll = wm8994_set_fll,
2937 .set_tristate = wm8994_set_tristate,
2941 .set_sysclk = wm8994_set_dai_sysclk,
2942 .set_fmt = wm8994_set_dai_fmt,
2943 .hw_params = wm8994_hw_params,
2944 .digital_mute = wm8994_aif_mute,
2945 .set_pll = wm8994_set_fll,
2946 .set_tristate = wm8994_set_tristate,
2950 .hw_params = wm8994_aif3_hw_params,
2955 .name =
"wm8994-aif1",
2958 .stream_name =
"AIF1 Playback",
2966 .stream_name =
"AIF1 Capture",
2973 .ops = &wm8994_aif1_dai_ops,
2976 .name =
"wm8994-aif2",
2979 .stream_name =
"AIF2 Playback",
2987 .stream_name =
"AIF2 Capture",
2994 .probe = wm8994_aif2_probe,
2995 .ops = &wm8994_aif2_dai_ops,
2998 .name =
"wm8994-aif3",
3001 .stream_name =
"AIF3 Playback",
3009 .stream_name =
"AIF3 Capture",
3016 .ops = &wm8994_aif3_dai_ops,
3023 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
3029 ret = _wm8994_set_fll(codec, i + 1, 0, 0, 0);
3031 dev_warn(codec->
dev,
"Failed to stop FLL%d: %d\n",
3042 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
3043 struct wm8994 *control = wm8994->
wm8994;
3066 ret = _wm8994_set_fll(codec, i + 1,
3071 dev_warn(codec->
dev,
"Failed to restore FLL%d: %d\n",
3078 #define wm8994_codec_suspend NULL
3079 #define wm8994_codec_resume NULL
3082 static void wm8994_handle_retune_mobile_pdata(
struct wm8994_priv *wm8994)
3089 wm8994_get_retune_mobile_enum,
3090 wm8994_put_retune_mobile_enum),
3093 wm8994_get_retune_mobile_enum,
3094 wm8994_put_retune_mobile_enum),
3097 wm8994_get_retune_mobile_enum,
3098 wm8994_put_retune_mobile_enum),
3136 dev_dbg(codec->
dev,
"Allocated %d unique ReTune Mobile names\n",
3146 "Failed to add ReTune Mobile controls: %d\n", ret);
3149 static void wm8994_handle_pdata(
struct wm8994_priv *wm8994)
3174 wm8994_get_drc_enum, wm8994_put_drc_enum),
3176 wm8994_get_drc_enum, wm8994_put_drc_enum),
3178 wm8994_get_drc_enum, wm8994_put_drc_enum),
3186 "Failed to allocate %d DRC config texts\n",
3200 wm8994_set_drc(codec, i);
3203 wm8994_drc_controls,
3209 "Failed to add DRC mode controls: %d\n", ret);
3212 dev_dbg(codec->
dev,
"%d ReTune Mobile configurations\n",
3216 wm8994_handle_retune_mobile_pdata(wm8994);
3247 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
3249 struct wm8994 *control = wm8994->
wm8994;
3259 micdet = &wm8994->
micdet[0];
3268 micdet = &wm8994->
micdet[1];
3277 dev_warn(codec->
dev,
"Invalid MICBIAS %d\n", micbias);
3282 dev_warn(codec->
dev,
"Failed to configure MICBIAS%d: %d\n",
3285 dev_dbg(codec->
dev,
"Configuring microphone detection on %d %p\n",
3289 micdet->
jack = jack;
3323 pm_runtime_get_sync(dev);
3327 dev_err(dev,
"Failed to read microphone status: %d\n",
3329 pm_runtime_put(dev);
3333 dev_dbg(dev,
"Microphone status: %x\n", reg);
3337 if (priv->
micdet[0].detecting)
3341 if (priv->
micdet[0].detecting)
3347 priv->
micdet[0].detecting =
false;
3349 priv->
micdet[0].detecting =
true;
3356 if (priv->
micdet[1].detecting)
3360 if (priv->
micdet[1].detecting)
3366 priv->
micdet[1].detecting =
false;
3368 priv->
micdet[1].detecting =
true;
3373 pm_runtime_put(dev);
3381 #ifndef CONFIG_SND_SOC_WM8994_MODULE
3382 trace_snd_soc_jack_irq(dev_name(codec->
dev));
3395 static void wm8958_default_micdet(
u16 status,
void *data)
3398 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
3407 dev_dbg(codec->
dev,
"Detected open circuit\n");
3411 wm8958_micd_set_rate(codec);
3424 dev_dbg(codec->
dev,
"Detected microphone\n");
3429 wm8958_micd_set_rate(codec);
3440 wm8958_micd_set_rate(codec);
3449 wm1811_jackdet_set_mode(codec,
3454 if (wm8994->
pdata->jd_ext_cap)
3489 static irqreturn_t wm1811_jackdet_irq(
int irq,
void *data)
3496 pm_runtime_get_sync(codec->
dev);
3502 dev_err(codec->
dev,
"Failed to read jack status: %d\n", reg);
3504 pm_runtime_put(codec->
dev);
3515 wm8958_micd_set_rate(codec);
3553 if (wm8994->
pdata->jd_ext_cap) {
3573 pm_runtime_put(codec->
dev);
3577 static void wm1811_jackdet_bootstrap(
struct work_struct *work)
3582 wm1811_jackdet_irq(0, wm8994);
3604 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
3605 struct wm8994 *control = wm8994->
wm8994;
3608 switch (control->
type) {
3618 dev_dbg(codec->
dev,
"Using default micdet callback\n");
3619 cb = wm8958_default_micdet;
3626 wm8994->
micdet[0].jack = jack;
3633 wm8958_micd_set_rate(codec);
3636 if (wm8994->
pdata->micd_lvl_sel)
3637 micd_lvl_sel = wm8994->
pdata->micd_lvl_sel;
3639 micd_lvl_sel = 0x41;
3664 wm1811_jackdet_set_mode(codec,
3683 static irqreturn_t wm8958_mic_irq(
int irq,
void *data)
3697 pm_runtime_get_sync(codec->
dev);
3707 "Failed to read mic detect status: %d\n",
3709 pm_runtime_put(codec->
dev);
3714 dev_dbg(codec->
dev,
"Mic detect data not valid\n");
3725 dev_warn(codec->
dev,
"No impedance range reported for jack\n");
3727 #ifndef CONFIG_SND_SOC_WM8994_MODULE
3728 trace_snd_soc_jack_irq(dev_name(codec->
dev));
3734 dev_warn(codec->
dev,
"Accessory detection with no callback\n");
3737 pm_runtime_put(codec->
dev);
3741 static irqreturn_t wm8994_fifo_error(
int irq,
void *data)
3750 static irqreturn_t wm8994_temp_warn(
int irq,
void *data)
3759 static irqreturn_t wm8994_temp_shut(
int irq,
void *data)
3763 dev_crit(codec->
dev,
"Thermal shutdown\n");
3771 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
3784 wm1811_jackdet_bootstrap);
3789 if (wm8994->
pdata && wm8994->
pdata->micdet_irq)
3793 pm_runtime_idle(codec->
dev);
3796 codec->
dapm.idle_bias_off = 1;
3800 switch (control->
type) {
3803 if (!wm8994->
pdata->lineout1_diff ||
3804 !wm8994->
pdata->lineout2_diff)
3805 codec->
dapm.idle_bias_off = 0;
3810 wm8994->
hubs.dcs_codes_l = -5;
3811 wm8994->
hubs.dcs_codes_r = -5;
3812 wm8994->
hubs.hp_startup_mode = 1;
3813 wm8994->
hubs.dcs_readback_mode = 1;
3814 wm8994->
hubs.series_startup = 1;
3817 wm8994->
hubs.dcs_readback_mode = 2;
3823 wm8994->
hubs.dcs_readback_mode = 1;
3824 wm8994->
hubs.hp_startup_mode = 1;
3836 wm8994->
hubs.dcs_readback_mode = 2;
3837 wm8994->
hubs.no_series_update = 1;
3838 wm8994->
hubs.hp_startup_mode = 1;
3839 wm8994->
hubs.no_cache_dac_hp_direct =
true;
3845 wm8994->
hubs.dcs_codes_l = -9;
3846 wm8994->
hubs.dcs_codes_r = -7;
3850 wm8994->
hubs.dcs_codes_l = -8;
3851 wm8994->
hubs.dcs_codes_r = -7;
3866 wm8994_fifo_error,
"FIFO error", codec);
3868 wm8994_temp_warn,
"Thermal warning", codec);
3870 wm8994_temp_shut,
"Thermal shutdown", codec);
3876 wm8994->
hubs.dcs_done_irq =
true;
3878 switch (control->
type) {
3888 "Failed to request Mic1 detect IRQ: %d\n",
3892 ret = wm8994_request_irq(wm8994->
wm8994,
3894 wm8994_mic_irq,
"Mic 1 short",
3898 "Failed to request Mic1 short IRQ: %d\n",
3901 ret = wm8994_request_irq(wm8994->
wm8994,
3903 wm8994_mic_irq,
"Mic 2 detect",
3907 "Failed to request Mic2 detect IRQ: %d\n",
3910 ret = wm8994_request_irq(wm8994->
wm8994,
3912 wm8994_mic_irq,
"Mic 2 short",
3916 "Failed to request Mic2 short IRQ: %d\n",
3930 "Failed to request Mic detect IRQ: %d\n",
3934 wm8958_mic_irq,
"Mic detect",
3939 switch (control->
type) {
3942 ret = wm8994_request_irq(wm8994->
wm8994,
3944 wm1811_jackdet_irq,
"JACKDET",
3956 ret = wm8994_request_irq(wm8994->
wm8994,
3958 wm8994_fll_locked_irq,
"FLL lock",
3965 pm_runtime_get_sync(codec->
dev);
3973 dev_err(codec->
dev,
"Failed to read GPIO1 state: %d\n", ret);
3985 dev_err(codec->
dev,
"Failed to read GPIO6 state: %d\n", ret);
3995 pm_runtime_put(codec->
dev);
3998 for (i = 0; i <
ARRAY_SIZE(wm8994_vu_bits); i++)
4000 wm8994_vu_bits[i].mask,
4001 wm8994_vu_bits[i].mask);
4017 switch (control->
type) {
4028 switch (control->
type) {
4040 wm8994->
hubs.check_class_w_digital = wm8994_check_class_w_digital;
4043 wm8994_handle_pdata(wm8994);
4051 switch (control->
type) {
4110 switch (control->
type) {
4174 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec);
4175 struct wm8994 *control = wm8994->
wm8994;
4180 pm_runtime_disable(codec->
dev);
4195 switch (control->
type) {
4221 .probe = wm8994_codec_probe,
4222 .remove = wm8994_codec_remove,
4225 .set_bias_level = wm8994_set_bias_level,
4236 platform_set_drvdata(pdev, wm8994);
4239 wm8994->
pdata = dev_get_platdata(pdev->
dev.parent);
4251 #ifdef CONFIG_PM_SLEEP
4252 static int wm8994_suspend(
struct device *dev)
4265 static int wm8994_resume(
struct device *dev)
4278 static const struct dev_pm_ops wm8994_pm_ops = {
4284 .name =
"wm8994-codec",
4286 .pm = &wm8994_pm_ops,
4288 .probe = wm8994_probe,