Lines Matching +full:i2c +full:- +full:1
1 // SPDX-License-Identifier: GPL-2.0-only
3 * wm2000.c -- WM2000 ALSA Soc Audio driver
5 * Copyright 2008-2011 Wolfson Microelectronics PLC.
13 * system-specific calibration information. If supplied as a
14 * sequence of ASCII-encoded hexidecimal bytes this can be converted
17 * perl -e 'while (<>) { s/[\r\n]+// ; printf("%c", hex($_)); }'
29 #include <linux/i2c.h>
55 ANC_BYPASS = 1,
61 struct i2c_client *i2c; member
69 unsigned int anc_active:1;
70 unsigned int anc_eng_ena:1;
71 unsigned int spk_ena:1;
73 unsigned int speech_clarity:1;
81 static int wm2000_write(struct i2c_client *i2c, unsigned int reg, in wm2000_write() argument
84 struct wm2000_priv *wm2000 = i2c_get_clientdata(i2c); in wm2000_write()
85 return regmap_write(wm2000->regmap, reg, value); in wm2000_write()
90 struct i2c_client *i2c = wm2000->i2c; in wm2000_reset() local
92 wm2000_write(i2c, WM2000_REG_SYS_CTL2, WM2000_ANC_ENG_CLR); in wm2000_reset()
93 wm2000_write(i2c, WM2000_REG_SYS_CTL2, WM2000_RAM_CLR); in wm2000_reset()
94 wm2000_write(i2c, WM2000_REG_ID1, 0); in wm2000_reset()
96 wm2000->anc_mode = ANC_OFF; in wm2000_reset()
99 static int wm2000_poll_bit(struct i2c_client *i2c, in wm2000_poll_bit() argument
102 struct wm2000_priv *wm2000 = i2c_get_clientdata(i2c); in wm2000_poll_bit()
106 regmap_read(wm2000->regmap, reg, &val); in wm2000_poll_bit()
108 while (!(val & mask) && --timeout) { in wm2000_poll_bit()
109 msleep(1); in wm2000_poll_bit()
110 regmap_read(wm2000->regmap, reg, &val); in wm2000_poll_bit()
116 return 1; in wm2000_poll_bit()
119 static int wm2000_power_up(struct i2c_client *i2c, int analogue) in wm2000_power_up() argument
121 struct wm2000_priv *wm2000 = dev_get_drvdata(&i2c->dev); in wm2000_power_up()
126 if (WARN_ON(wm2000->anc_mode != ANC_OFF)) in wm2000_power_up()
127 return -EINVAL; in wm2000_power_up()
129 dev_dbg(&i2c->dev, "Beginning power up\n"); in wm2000_power_up()
131 ret = regulator_bulk_enable(WM2000_NUM_SUPPLIES, wm2000->supplies); in wm2000_power_up()
133 dev_err(&i2c->dev, "Failed to enable supplies: %d\n", ret); in wm2000_power_up()
137 rate = clk_get_rate(wm2000->mclk); in wm2000_power_up()
139 dev_dbg(&i2c->dev, "Disabling MCLK divider\n"); in wm2000_power_up()
140 wm2000_write(i2c, WM2000_REG_SYS_CTL2, in wm2000_power_up()
143 dev_dbg(&i2c->dev, "Enabling MCLK divider\n"); in wm2000_power_up()
144 wm2000_write(i2c, WM2000_REG_SYS_CTL2, in wm2000_power_up()
148 wm2000_write(i2c, WM2000_REG_SYS_CTL2, WM2000_ANC_ENG_CLR); in wm2000_power_up()
149 wm2000_write(i2c, WM2000_REG_SYS_CTL2, WM2000_ANC_ENG_SET); in wm2000_power_up()
152 if (!wm2000_poll_bit(i2c, WM2000_REG_ANC_STAT, in wm2000_power_up()
154 dev_err(&i2c->dev, "ANC engine failed to reset\n"); in wm2000_power_up()
155 regulator_bulk_disable(WM2000_NUM_SUPPLIES, wm2000->supplies); in wm2000_power_up()
156 return -ETIMEDOUT; in wm2000_power_up()
159 if (!wm2000_poll_bit(i2c, WM2000_REG_SYS_STATUS, in wm2000_power_up()
161 dev_err(&i2c->dev, "ANC engine failed to initialise\n"); in wm2000_power_up()
162 regulator_bulk_disable(WM2000_NUM_SUPPLIES, wm2000->supplies); in wm2000_power_up()
163 return -ETIMEDOUT; in wm2000_power_up()
166 wm2000_write(i2c, WM2000_REG_SYS_CTL2, WM2000_RAM_SET); in wm2000_power_up()
170 dev_dbg(&i2c->dev, "Downloading %d bytes\n", in wm2000_power_up()
171 wm2000->anc_download_size - 2); in wm2000_power_up()
173 ret = i2c_master_send(i2c, wm2000->anc_download, in wm2000_power_up()
174 wm2000->anc_download_size); in wm2000_power_up()
176 dev_err(&i2c->dev, "i2c_transfer() failed: %d\n", ret); in wm2000_power_up()
177 regulator_bulk_disable(WM2000_NUM_SUPPLIES, wm2000->supplies); in wm2000_power_up()
180 if (ret != wm2000->anc_download_size) { in wm2000_power_up()
181 dev_err(&i2c->dev, "i2c_transfer() failed, %d != %d\n", in wm2000_power_up()
182 ret, wm2000->anc_download_size); in wm2000_power_up()
183 regulator_bulk_disable(WM2000_NUM_SUPPLIES, wm2000->supplies); in wm2000_power_up()
184 return -EIO; in wm2000_power_up()
187 dev_dbg(&i2c->dev, "Download complete\n"); in wm2000_power_up()
190 wm2000_write(i2c, WM2000_REG_ANA_VMID_PU_TIME, 248 / 4); in wm2000_power_up()
192 wm2000_write(i2c, WM2000_REG_SYS_MODE_CNTRL, in wm2000_power_up()
197 wm2000_write(i2c, WM2000_REG_SYS_MODE_CNTRL, in wm2000_power_up()
202 ret = regmap_read(wm2000->regmap, WM2000_REG_SPEECH_CLARITY, &val); in wm2000_power_up()
204 dev_err(&i2c->dev, "Unable to read Speech Clarity: %d\n", ret); in wm2000_power_up()
205 regulator_bulk_disable(WM2000_NUM_SUPPLIES, wm2000->supplies); in wm2000_power_up()
208 if (wm2000->speech_clarity) in wm2000_power_up()
212 wm2000_write(i2c, WM2000_REG_SPEECH_CLARITY, val); in wm2000_power_up()
214 wm2000_write(i2c, WM2000_REG_SYS_START0, 0x33); in wm2000_power_up()
215 wm2000_write(i2c, WM2000_REG_SYS_START1, 0x02); in wm2000_power_up()
217 wm2000_write(i2c, WM2000_REG_SYS_CTL2, WM2000_ANC_INT_N_CLR); in wm2000_power_up()
219 if (!wm2000_poll_bit(i2c, WM2000_REG_SYS_STATUS, in wm2000_power_up()
221 dev_err(&i2c->dev, "Timed out waiting for device\n"); in wm2000_power_up()
222 regulator_bulk_disable(WM2000_NUM_SUPPLIES, wm2000->supplies); in wm2000_power_up()
223 return -ETIMEDOUT; in wm2000_power_up()
226 dev_dbg(&i2c->dev, "ANC active\n"); in wm2000_power_up()
228 dev_dbg(&i2c->dev, "Analogue active\n"); in wm2000_power_up()
229 wm2000->anc_mode = ANC_ACTIVE; in wm2000_power_up()
234 static int wm2000_power_down(struct i2c_client *i2c, int analogue) in wm2000_power_down() argument
236 struct wm2000_priv *wm2000 = dev_get_drvdata(&i2c->dev); in wm2000_power_down()
239 wm2000_write(i2c, WM2000_REG_ANA_VMID_PD_TIME, 248 / 4); in wm2000_power_down()
240 wm2000_write(i2c, WM2000_REG_SYS_MODE_CNTRL, in wm2000_power_down()
244 wm2000_write(i2c, WM2000_REG_SYS_MODE_CNTRL, in wm2000_power_down()
248 if (!wm2000_poll_bit(i2c, WM2000_REG_SYS_STATUS, in wm2000_power_down()
250 dev_err(&i2c->dev, "Timeout waiting for ANC power down\n"); in wm2000_power_down()
251 return -ETIMEDOUT; in wm2000_power_down()
254 if (!wm2000_poll_bit(i2c, WM2000_REG_ANC_STAT, in wm2000_power_down()
256 dev_err(&i2c->dev, "Timeout waiting for ANC engine idle\n"); in wm2000_power_down()
257 return -ETIMEDOUT; in wm2000_power_down()
260 regulator_bulk_disable(WM2000_NUM_SUPPLIES, wm2000->supplies); in wm2000_power_down()
262 dev_dbg(&i2c->dev, "powered off\n"); in wm2000_power_down()
263 wm2000->anc_mode = ANC_OFF; in wm2000_power_down()
268 static int wm2000_enter_bypass(struct i2c_client *i2c, int analogue) in wm2000_enter_bypass() argument
270 struct wm2000_priv *wm2000 = dev_get_drvdata(&i2c->dev); in wm2000_enter_bypass()
272 if (WARN_ON(wm2000->anc_mode != ANC_ACTIVE)) in wm2000_enter_bypass()
273 return -EINVAL; in wm2000_enter_bypass()
276 wm2000_write(i2c, WM2000_REG_SYS_MODE_CNTRL, in wm2000_enter_bypass()
281 wm2000_write(i2c, WM2000_REG_SYS_MODE_CNTRL, in wm2000_enter_bypass()
286 if (!wm2000_poll_bit(i2c, WM2000_REG_SYS_STATUS, in wm2000_enter_bypass()
288 dev_err(&i2c->dev, "Timeout waiting for ANC disable\n"); in wm2000_enter_bypass()
289 return -ETIMEDOUT; in wm2000_enter_bypass()
292 if (!wm2000_poll_bit(i2c, WM2000_REG_ANC_STAT, in wm2000_enter_bypass()
294 dev_err(&i2c->dev, "Timeout waiting for ANC engine idle\n"); in wm2000_enter_bypass()
295 return -ETIMEDOUT; in wm2000_enter_bypass()
298 wm2000_write(i2c, WM2000_REG_SYS_CTL1, WM2000_SYS_STBY); in wm2000_enter_bypass()
299 wm2000_write(i2c, WM2000_REG_SYS_CTL2, WM2000_RAM_CLR); in wm2000_enter_bypass()
301 wm2000->anc_mode = ANC_BYPASS; in wm2000_enter_bypass()
302 dev_dbg(&i2c->dev, "bypass enabled\n"); in wm2000_enter_bypass()
307 static int wm2000_exit_bypass(struct i2c_client *i2c, int analogue) in wm2000_exit_bypass() argument
309 struct wm2000_priv *wm2000 = dev_get_drvdata(&i2c->dev); in wm2000_exit_bypass()
311 if (WARN_ON(wm2000->anc_mode != ANC_BYPASS)) in wm2000_exit_bypass()
312 return -EINVAL; in wm2000_exit_bypass()
314 wm2000_write(i2c, WM2000_REG_SYS_CTL1, 0); in wm2000_exit_bypass()
317 wm2000_write(i2c, WM2000_REG_SYS_MODE_CNTRL, in wm2000_exit_bypass()
322 wm2000_write(i2c, WM2000_REG_SYS_MODE_CNTRL, in wm2000_exit_bypass()
327 wm2000_write(i2c, WM2000_REG_SYS_CTL2, WM2000_RAM_SET); in wm2000_exit_bypass()
328 wm2000_write(i2c, WM2000_REG_SYS_CTL2, WM2000_ANC_INT_N_CLR); in wm2000_exit_bypass()
330 if (!wm2000_poll_bit(i2c, WM2000_REG_SYS_STATUS, in wm2000_exit_bypass()
332 dev_err(&i2c->dev, "Timed out waiting for MOUSE\n"); in wm2000_exit_bypass()
333 return -ETIMEDOUT; in wm2000_exit_bypass()
336 wm2000->anc_mode = ANC_ACTIVE; in wm2000_exit_bypass()
337 dev_dbg(&i2c->dev, "MOUSE active\n"); in wm2000_exit_bypass()
342 static int wm2000_enter_standby(struct i2c_client *i2c, int analogue) in wm2000_enter_standby() argument
344 struct wm2000_priv *wm2000 = dev_get_drvdata(&i2c->dev); in wm2000_enter_standby()
346 if (WARN_ON(wm2000->anc_mode != ANC_ACTIVE)) in wm2000_enter_standby()
347 return -EINVAL; in wm2000_enter_standby()
350 wm2000_write(i2c, WM2000_REG_ANA_VMID_PD_TIME, 248 / 4); in wm2000_enter_standby()
352 wm2000_write(i2c, WM2000_REG_SYS_MODE_CNTRL, in wm2000_enter_standby()
357 wm2000_write(i2c, WM2000_REG_SYS_MODE_CNTRL, in wm2000_enter_standby()
362 if (!wm2000_poll_bit(i2c, WM2000_REG_SYS_STATUS, in wm2000_enter_standby()
364 dev_err(&i2c->dev, in wm2000_enter_standby()
365 "Timed out waiting for ANC disable after 1ms\n"); in wm2000_enter_standby()
366 return -ETIMEDOUT; in wm2000_enter_standby()
369 if (!wm2000_poll_bit(i2c, WM2000_REG_ANC_STAT, WM2000_ANC_ENG_IDLE)) { in wm2000_enter_standby()
370 dev_err(&i2c->dev, in wm2000_enter_standby()
372 return -ETIMEDOUT; in wm2000_enter_standby()
375 wm2000_write(i2c, WM2000_REG_SYS_CTL1, WM2000_SYS_STBY); in wm2000_enter_standby()
376 wm2000_write(i2c, WM2000_REG_SYS_CTL2, WM2000_RAM_CLR); in wm2000_enter_standby()
378 wm2000->anc_mode = ANC_STANDBY; in wm2000_enter_standby()
379 dev_dbg(&i2c->dev, "standby\n"); in wm2000_enter_standby()
381 dev_dbg(&i2c->dev, "Analogue disabled\n"); in wm2000_enter_standby()
386 static int wm2000_exit_standby(struct i2c_client *i2c, int analogue) in wm2000_exit_standby() argument
388 struct wm2000_priv *wm2000 = dev_get_drvdata(&i2c->dev); in wm2000_exit_standby()
390 if (WARN_ON(wm2000->anc_mode != ANC_STANDBY)) in wm2000_exit_standby()
391 return -EINVAL; in wm2000_exit_standby()
393 wm2000_write(i2c, WM2000_REG_SYS_CTL1, 0); in wm2000_exit_standby()
396 wm2000_write(i2c, WM2000_REG_ANA_VMID_PU_TIME, 248 / 4); in wm2000_exit_standby()
398 wm2000_write(i2c, WM2000_REG_SYS_MODE_CNTRL, in wm2000_exit_standby()
403 wm2000_write(i2c, WM2000_REG_SYS_MODE_CNTRL, in wm2000_exit_standby()
408 wm2000_write(i2c, WM2000_REG_SYS_CTL2, WM2000_RAM_SET); in wm2000_exit_standby()
409 wm2000_write(i2c, WM2000_REG_SYS_CTL2, WM2000_ANC_INT_N_CLR); in wm2000_exit_standby()
411 if (!wm2000_poll_bit(i2c, WM2000_REG_SYS_STATUS, in wm2000_exit_standby()
413 dev_err(&i2c->dev, "Timed out waiting for MOUSE\n"); in wm2000_exit_standby()
414 return -ETIMEDOUT; in wm2000_exit_standby()
417 wm2000->anc_mode = ANC_ACTIVE; in wm2000_exit_standby()
418 dev_dbg(&i2c->dev, "MOUSE active\n"); in wm2000_exit_standby()
420 dev_dbg(&i2c->dev, "Analogue enabled\n"); in wm2000_exit_standby()
425 typedef int (*wm2000_mode_fn)(struct i2c_client *i2c, int analogue);
436 .analogue = 1,
452 .analogue = 1,
461 .analogue = 1,
469 .analogue = 1,
477 .analogue = 1,
485 .analogue = 1,
493 .analogue = 1,
510 .analogue = 1,
518 .analogue = 1,
537 struct i2c_client *i2c = wm2000->i2c; in wm2000_anc_transition() local
541 if (wm2000->anc_mode == mode) in wm2000_anc_transition()
545 if (anc_transitions[i].source == wm2000->anc_mode && in wm2000_anc_transition()
549 dev_err(&i2c->dev, "No transition for %d->%d\n", in wm2000_anc_transition()
550 wm2000->anc_mode, mode); in wm2000_anc_transition()
551 return -EINVAL; in wm2000_anc_transition()
556 ret = clk_prepare_enable(wm2000->mclk); in wm2000_anc_transition()
558 dev_err(&i2c->dev, "Failed to enable MCLK: %d\n", ret); in wm2000_anc_transition()
566 ret = anc_transitions[i].step[j](i2c, in wm2000_anc_transition()
573 clk_disable_unprepare(wm2000->mclk); in wm2000_anc_transition()
580 struct i2c_client *i2c = wm2000->i2c; in wm2000_anc_set_mode() local
583 if (wm2000->anc_eng_ena && wm2000->spk_ena) in wm2000_anc_set_mode()
584 if (wm2000->anc_active) in wm2000_anc_set_mode()
591 dev_dbg(&i2c->dev, "Set mode %d (enabled %d, mute %d, active %d)\n", in wm2000_anc_set_mode()
592 mode, wm2000->anc_eng_ena, !wm2000->spk_ena, in wm2000_anc_set_mode()
593 wm2000->anc_active); in wm2000_anc_set_mode()
602 struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev); in wm2000_anc_mode_get()
604 ucontrol->value.integer.value[0] = wm2000->anc_active; in wm2000_anc_mode_get()
613 struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev); in wm2000_anc_mode_put()
614 unsigned int anc_active = ucontrol->value.integer.value[0]; in wm2000_anc_mode_put()
617 if (anc_active > 1) in wm2000_anc_mode_put()
618 return -EINVAL; in wm2000_anc_mode_put()
620 mutex_lock(&wm2000->lock); in wm2000_anc_mode_put()
622 wm2000->anc_active = anc_active; in wm2000_anc_mode_put()
626 mutex_unlock(&wm2000->lock); in wm2000_anc_mode_put()
635 struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev); in wm2000_speaker_get()
637 ucontrol->value.integer.value[0] = wm2000->spk_ena; in wm2000_speaker_get()
646 struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev); in wm2000_speaker_put()
647 unsigned int val = ucontrol->value.integer.value[0]; in wm2000_speaker_put()
650 if (val > 1) in wm2000_speaker_put()
651 return -EINVAL; in wm2000_speaker_put()
653 mutex_lock(&wm2000->lock); in wm2000_speaker_put()
655 wm2000->spk_ena = val; in wm2000_speaker_put()
659 mutex_unlock(&wm2000->lock); in wm2000_speaker_put()
677 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in wm2000_anc_power_event()
678 struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev); in wm2000_anc_power_event()
681 mutex_lock(&wm2000->lock); in wm2000_anc_power_event()
684 wm2000->anc_eng_ena = 1; in wm2000_anc_power_event()
687 wm2000->anc_eng_ena = 0; in wm2000_anc_power_event()
691 mutex_unlock(&wm2000->lock); in wm2000_anc_power_event()
720 struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev); in wm2000_suspend()
727 struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev); in wm2000_resume()
778 struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev); in wm2000_probe()
788 struct wm2000_priv *wm2000 = dev_get_drvdata(component->dev); in wm2000_remove()
804 .idle_bias_on = 1,
805 .use_pmdown_time = 1,
808 static int wm2000_i2c_probe(struct i2c_client *i2c) in wm2000_i2c_probe() argument
818 wm2000 = devm_kzalloc(&i2c->dev, sizeof(*wm2000), GFP_KERNEL); in wm2000_i2c_probe()
820 return -ENOMEM; in wm2000_i2c_probe()
822 mutex_init(&wm2000->lock); in wm2000_i2c_probe()
824 dev_set_drvdata(&i2c->dev, wm2000); in wm2000_i2c_probe()
826 wm2000->regmap = devm_regmap_init_i2c(i2c, &wm2000_regmap); in wm2000_i2c_probe()
827 if (IS_ERR(wm2000->regmap)) { in wm2000_i2c_probe()
828 ret = PTR_ERR(wm2000->regmap); in wm2000_i2c_probe()
829 dev_err(&i2c->dev, "Failed to allocate register map: %d\n", in wm2000_i2c_probe()
835 wm2000->supplies[i].supply = wm2000_supplies[i]; in wm2000_i2c_probe()
837 ret = devm_regulator_bulk_get(&i2c->dev, WM2000_NUM_SUPPLIES, in wm2000_i2c_probe()
838 wm2000->supplies); in wm2000_i2c_probe()
840 dev_err(&i2c->dev, "Failed to get supplies: %d\n", ret); in wm2000_i2c_probe()
844 ret = regulator_bulk_enable(WM2000_NUM_SUPPLIES, wm2000->supplies); in wm2000_i2c_probe()
846 dev_err(&i2c->dev, "Failed to enable supplies: %d\n", ret); in wm2000_i2c_probe()
851 ret = regmap_read(wm2000->regmap, WM2000_REG_ID1, ®); in wm2000_i2c_probe()
853 dev_err(&i2c->dev, "Unable to read ID1: %d\n", ret); in wm2000_i2c_probe()
857 ret = regmap_read(wm2000->regmap, WM2000_REG_ID2, ®); in wm2000_i2c_probe()
859 dev_err(&i2c->dev, "Unable to read ID2: %d\n", ret); in wm2000_i2c_probe()
865 dev_err(&i2c->dev, "Device is not a WM2000 - ID %x\n", id); in wm2000_i2c_probe()
866 ret = -ENODEV; in wm2000_i2c_probe()
870 ret = regmap_read(wm2000->regmap, WM2000_REG_REVISON, ®); in wm2000_i2c_probe()
872 dev_err(&i2c->dev, "Unable to read Revision: %d\n", ret); in wm2000_i2c_probe()
875 dev_info(&i2c->dev, "revision %c\n", reg + 'A'); in wm2000_i2c_probe()
877 wm2000->mclk = devm_clk_get(&i2c->dev, "MCLK"); in wm2000_i2c_probe()
878 if (IS_ERR(wm2000->mclk)) { in wm2000_i2c_probe()
879 ret = PTR_ERR(wm2000->mclk); in wm2000_i2c_probe()
880 dev_err(&i2c->dev, "Failed to get MCLK: %d\n", ret); in wm2000_i2c_probe()
885 pdata = dev_get_platdata(&i2c->dev); in wm2000_i2c_probe()
887 wm2000->speech_clarity = !pdata->speech_enh_disable; in wm2000_i2c_probe()
889 if (pdata->download_file) in wm2000_i2c_probe()
890 filename = pdata->download_file; in wm2000_i2c_probe()
893 ret = request_firmware(&fw, filename, &i2c->dev); in wm2000_i2c_probe()
895 dev_err(&i2c->dev, "Failed to acquire ANC data: %d\n", ret); in wm2000_i2c_probe()
899 /* Pre-cook the concatenation of the register address onto the image */ in wm2000_i2c_probe()
900 wm2000->anc_download_size = fw->size + 2; in wm2000_i2c_probe()
901 wm2000->anc_download = devm_kzalloc(&i2c->dev, in wm2000_i2c_probe()
902 wm2000->anc_download_size, in wm2000_i2c_probe()
904 if (wm2000->anc_download == NULL) { in wm2000_i2c_probe()
905 ret = -ENOMEM; in wm2000_i2c_probe()
909 wm2000->anc_download[0] = 0x80; in wm2000_i2c_probe()
910 wm2000->anc_download[1] = 0x00; in wm2000_i2c_probe()
911 memcpy(wm2000->anc_download + 2, fw->data, fw->size); in wm2000_i2c_probe()
913 wm2000->anc_eng_ena = 1; in wm2000_i2c_probe()
914 wm2000->anc_active = 1; in wm2000_i2c_probe()
915 wm2000->spk_ena = 1; in wm2000_i2c_probe()
916 wm2000->i2c = i2c; in wm2000_i2c_probe()
920 ret = devm_snd_soc_register_component(&i2c->dev, in wm2000_i2c_probe()
924 regulator_bulk_disable(WM2000_NUM_SUPPLIES, wm2000->supplies); in wm2000_i2c_probe()
935 MODULE_DEVICE_TABLE(i2c, wm2000_i2c_id);