Lines Matching +full:mclk +full:- +full:calibrate

1 // SPDX-License-Identifier: GPL-2.0-only
3 * wm8903.c -- WM8903 ALSA SoC Audio driver
5 * Copyright 2008-12 Wolfson Microelectronics
6 * Copyright 2011-2012 NVIDIA, Inc.
11 * - TDM mode configuration.
12 * - Digital microphone support.
42 { 4, 0x0018 }, /* R4 - Bias Control 0 */
43 { 5, 0x0000 }, /* R5 - VMID Control 0 */
44 { 6, 0x0000 }, /* R6 - Mic Bias Control 0 */
45 { 8, 0x0001 }, /* R8 - Analogue DAC 0 */
46 { 10, 0x0001 }, /* R10 - Analogue ADC 0 */
47 { 12, 0x0000 }, /* R12 - Power Management 0 */
48 { 13, 0x0000 }, /* R13 - Power Management 1 */
49 { 14, 0x0000 }, /* R14 - Power Management 2 */
50 { 15, 0x0000 }, /* R15 - Power Management 3 */
51 { 16, 0x0000 }, /* R16 - Power Management 4 */
52 { 17, 0x0000 }, /* R17 - Power Management 5 */
53 { 18, 0x0000 }, /* R18 - Power Management 6 */
54 { 20, 0x0400 }, /* R20 - Clock Rates 0 */
55 { 21, 0x0D07 }, /* R21 - Clock Rates 1 */
56 { 22, 0x0000 }, /* R22 - Clock Rates 2 */
57 { 24, 0x0050 }, /* R24 - Audio Interface 0 */
58 { 25, 0x0242 }, /* R25 - Audio Interface 1 */
59 { 26, 0x0008 }, /* R26 - Audio Interface 2 */
60 { 27, 0x0022 }, /* R27 - Audio Interface 3 */
61 { 30, 0x00C0 }, /* R30 - DAC Digital Volume Left */
62 { 31, 0x00C0 }, /* R31 - DAC Digital Volume Right */
63 { 32, 0x0000 }, /* R32 - DAC Digital 0 */
64 { 33, 0x0000 }, /* R33 - DAC Digital 1 */
65 { 36, 0x00C0 }, /* R36 - ADC Digital Volume Left */
66 { 37, 0x00C0 }, /* R37 - ADC Digital Volume Right */
67 { 38, 0x0000 }, /* R38 - ADC Digital 0 */
68 { 39, 0x0073 }, /* R39 - Digital Microphone 0 */
69 { 40, 0x09BF }, /* R40 - DRC 0 */
70 { 41, 0x3241 }, /* R41 - DRC 1 */
71 { 42, 0x0020 }, /* R42 - DRC 2 */
72 { 43, 0x0000 }, /* R43 - DRC 3 */
73 { 44, 0x0085 }, /* R44 - Analogue Left Input 0 */
74 { 45, 0x0085 }, /* R45 - Analogue Right Input 0 */
75 { 46, 0x0044 }, /* R46 - Analogue Left Input 1 */
76 { 47, 0x0044 }, /* R47 - Analogue Right Input 1 */
77 { 50, 0x0008 }, /* R50 - Analogue Left Mix 0 */
78 { 51, 0x0004 }, /* R51 - Analogue Right Mix 0 */
79 { 52, 0x0000 }, /* R52 - Analogue Spk Mix Left 0 */
80 { 53, 0x0000 }, /* R53 - Analogue Spk Mix Left 1 */
81 { 54, 0x0000 }, /* R54 - Analogue Spk Mix Right 0 */
82 { 55, 0x0000 }, /* R55 - Analogue Spk Mix Right 1 */
83 { 57, 0x002D }, /* R57 - Analogue OUT1 Left */
84 { 58, 0x002D }, /* R58 - Analogue OUT1 Right */
85 { 59, 0x0039 }, /* R59 - Analogue OUT2 Left */
86 { 60, 0x0039 }, /* R60 - Analogue OUT2 Right */
87 { 62, 0x0139 }, /* R62 - Analogue OUT3 Left */
88 { 63, 0x0139 }, /* R63 - Analogue OUT3 Right */
89 { 64, 0x0000 }, /* R65 - Analogue SPK Output Control 0 */
90 { 67, 0x0010 }, /* R67 - DC Servo 0 */
91 { 69, 0x00A4 }, /* R69 - DC Servo 2 */
92 { 90, 0x0000 }, /* R90 - Analogue HP 0 */
93 { 94, 0x0000 }, /* R94 - Analogue Lineout 0 */
94 { 98, 0x0000 }, /* R98 - Charge Pump 0 */
95 { 104, 0x0000 }, /* R104 - Class W 0 */
96 { 108, 0x0000 }, /* R108 - Write Sequencer 0 */
97 { 109, 0x0000 }, /* R109 - Write Sequencer 1 */
98 { 110, 0x0000 }, /* R110 - Write Sequencer 2 */
99 { 111, 0x0000 }, /* R111 - Write Sequencer 3 */
100 { 112, 0x0000 }, /* R112 - Write Sequencer 4 */
101 { 114, 0x0000 }, /* R114 - Control Interface */
102 { 116, 0x00A8 }, /* R116 - GPIO Control 1 */
103 { 117, 0x00A8 }, /* R117 - GPIO Control 2 */
104 { 118, 0x00A8 }, /* R118 - GPIO Control 3 */
105 { 119, 0x0220 }, /* R119 - GPIO Control 4 */
106 { 120, 0x01A0 }, /* R120 - GPIO Control 5 */
107 { 122, 0xFFFF }, /* R122 - Interrupt Status 1 Mask */
108 { 123, 0x0000 }, /* R123 - Interrupt Polarity 1 */
109 { 126, 0x0000 }, /* R126 - Interrupt Control */
110 { 129, 0x0000 }, /* R129 - Control Interface Test 1 */
111 { 149, 0x6810 }, /* R149 - Charge Pump Test 1 */
112 { 164, 0x0028 }, /* R164 - Clock Rate Test 4 */
113 { 172, 0x0000 }, /* R172 - Analogue Output Bias 0 */
270 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); in wm8903_dcs_event()
275 wm8903->dcs_pending |= 1 << w->shift; in wm8903_dcs_event()
279 1 << w->shift, 0); in wm8903_dcs_event()
297 if (wm8903->dcs_pending) { in wm8903_seq_notifier()
298 dev_dbg(component->dev, "Starting DC servo for %x\n", in wm8903_seq_notifier()
299 wm8903->dcs_pending); in wm8903_seq_notifier()
302 for (i = 0; i < ARRAY_SIZE(wm8903->dcs_cache); i++) { in wm8903_seq_notifier()
303 if (!(wm8903->dcs_pending & (1 << i))) in wm8903_seq_notifier()
306 if (wm8903->dcs_cache[i]) { in wm8903_seq_notifier()
307 dev_dbg(component->dev, in wm8903_seq_notifier()
309 3 - i, wm8903->dcs_cache[i]); in wm8903_seq_notifier()
312 wm8903->dcs_cache[i] & 0xff); in wm8903_seq_notifier()
314 dev_dbg(component->dev, in wm8903_seq_notifier()
315 "Calibrate DC servo %d\n", 3 - i); in wm8903_seq_notifier()
321 if (wm8903->class_w_users) in wm8903_seq_notifier()
328 WM8903_DCS_ENA_MASK, wm8903->dcs_pending); in wm8903_seq_notifier()
338 if (wm8903->class_w_users) in wm8903_seq_notifier()
341 for (i = 0; i < ARRAY_SIZE(wm8903->dcs_cache); i++) { in wm8903_seq_notifier()
342 if (!(wm8903->dcs_pending & (1 << i))) in wm8903_seq_notifier()
347 dev_dbg(component->dev, "DC servo %d: %x\n", in wm8903_seq_notifier()
348 3 - i, val); in wm8903_seq_notifier()
349 wm8903->dcs_cache[i] = val; in wm8903_seq_notifier()
358 wm8903->dcs_pending = 0; in wm8903_seq_notifier()
381 if (ucontrol->value.integer.value[0]) { in wm8903_class_w_put()
382 if (wm8903->class_w_users == 0) { in wm8903_class_w_put()
383 dev_dbg(component->dev, "Disabling Class W\n"); in wm8903_class_w_put()
387 wm8903->class_w_users++; in wm8903_class_w_put()
394 if (!ucontrol->value.integer.value[0]) { in wm8903_class_w_put()
395 if (wm8903->class_w_users == 1) { in wm8903_class_w_put()
396 dev_dbg(component->dev, "Enabling Class W\n"); in wm8903_class_w_put()
400 wm8903->class_w_users--; in wm8903_class_w_put()
403 dev_dbg(component->dev, "Bypass use count now %d\n", in wm8903_class_w_put()
404 wm8903->class_w_users); in wm8903_class_w_put()
424 if (wm8903->deemph) { in wm8903_set_deemph()
427 if (abs(wm8903_deemph[i] - wm8903->fs) < in wm8903_set_deemph()
428 abs(wm8903_deemph[best] - wm8903->fs)) in wm8903_set_deemph()
438 dev_dbg(component->dev, "Set deemphasis %d (%dHz)\n", in wm8903_set_deemph()
451 ucontrol->value.integer.value[0] = wm8903->deemph; in wm8903_get_deemph()
461 unsigned int deemph = ucontrol->value.integer.value[0]; in wm8903_put_deemph()
465 return -EINVAL; in wm8903_put_deemph()
467 mutex_lock(&wm8903->lock); in wm8903_put_deemph()
468 if (wm8903->deemph != deemph) { in wm8903_put_deemph()
469 wm8903->deemph = deemph; in wm8903_put_deemph()
475 mutex_unlock(&wm8903->lock); in wm8903_put_deemph()
481 static const DECLARE_TLV_DB_SCALE(digital_tlv, -7200, 75, 1);
485 static const DECLARE_TLV_DB_SCALE(digital_sidetone_tlv, -3600, 300, 0);
486 static const DECLARE_TLV_DB_SCALE(out_tlv, -5700, 100, 0);
489 static const DECLARE_TLV_DB_SCALE(drc_tlv_amp, -2250, 75, 0);
492 static const DECLARE_TLV_DB_SCALE(drc_tlv_startup, -300, 50, 0);
495 "Hi-fi", "Voice 1", "Voice 2", "Voice 3"
584 "Single-Ended", "Differential Line", "Differential Mic"
649 /* Input PGAs - No TLV since the scale depends on PGA mode */
961 { "Left Input Mode Mux", "Single-Ended", "Left Input Inverting Mux" },
971 { "Right Input Mode Mux", "Single-Ended",
1172 dev_dbg(component->dev, "Enabling Class W\n"); in wm8903_set_bias_level()
1215 struct snd_soc_component *component = codec_dai->component; in wm8903_set_dai_sysclk()
1218 wm8903->sysclk = freq; in wm8903_set_dai_sysclk()
1226 struct snd_soc_component *component = codec_dai->component; in wm8903_set_dai_fmt()
1245 return -EINVAL; in wm8903_set_dai_fmt()
1264 return -EINVAL; in wm8903_set_dai_fmt()
1279 return -EINVAL; in wm8903_set_dai_fmt()
1298 return -EINVAL; in wm8903_set_dai_fmt()
1302 return -EINVAL; in wm8903_set_dai_fmt()
1312 struct snd_soc_component *component = codec_dai->component; in wm8903_mute()
1395 /* CLK_SYS/BCLK ratios - multiplied by 10 due to .5s */
1442 struct snd_soc_component *component = dai->component; in wm8903_hw_params()
1467 /* Configure sample rate logic for DSP - choose nearest rate */ in wm8903_hw_params()
1469 best_val = abs(sample_rates[dsp_config].rate - fs); in wm8903_hw_params()
1471 cur_val = abs(sample_rates[i].rate - fs); in wm8903_hw_params()
1478 dev_dbg(component->dev, "DSP fs = %dHz\n", sample_rates[dsp_config].rate); in wm8903_hw_params()
1501 return -EINVAL; in wm8903_hw_params()
1504 dev_dbg(component->dev, "MCLK = %dHz, target sample rate = %dHz\n", in wm8903_hw_params()
1505 wm8903->sysclk, fs); in wm8903_hw_params()
1507 /* We may not have an MCLK which allows us to generate exactly in wm8903_hw_params()
1512 best_val = abs((wm8903->sysclk / in wm8903_hw_params()
1514 clk_sys_ratios[0].div)) - fs); in wm8903_hw_params()
1516 cur_val = abs((wm8903->sysclk / in wm8903_hw_params()
1518 clk_sys_ratios[i].div)) - fs); in wm8903_hw_params()
1528 clk_sys = wm8903->sysclk / 2; in wm8903_hw_params()
1531 clk_sys = wm8903->sysclk; in wm8903_hw_params()
1539 dev_dbg(component->dev, "CLK_SYS_RATE=%x, CLK_SYS_MODE=%x div=%d\n", in wm8903_hw_params()
1544 dev_dbg(component->dev, "Actual CLK_SYS = %dHz\n", clk_sys); in wm8903_hw_params()
1554 cur_val = ((clk_sys * 10) / bclk_divs[i].ratio) - bclk; in wm8903_hw_params()
1564 dev_dbg(component->dev, "BCLK ratio %d for %dHz - actual BCLK = %dHz\n", in wm8903_hw_params()
1571 wm8903->fs = params_rate(params); in wm8903_hw_params()
1585 * wm8903_mic_detect - Enable microphone detection via the WM8903 IRQ
1607 dev_dbg(component->dev, "Enabling microphone detection: %x %x\n", in wm8903_mic_detect()
1611 wm8903->mic_jack = jack; in wm8903_mic_detect()
1612 wm8903->mic_det = det; in wm8903_mic_detect()
1613 wm8903->mic_short = shrt; in wm8903_mic_detect()
1647 ret = regmap_read(wm8903->regmap, WM8903_INTERRUPT_STATUS_1_MASK, in wm8903_irq()
1650 dev_err(wm8903->dev, "Failed to read IRQ mask: %d\n", ret); in wm8903_irq()
1654 ret = regmap_read(wm8903->regmap, WM8903_INTERRUPT_STATUS_1, &int_val); in wm8903_irq()
1656 dev_err(wm8903->dev, "Failed to read IRQ status: %d\n", ret); in wm8903_irq()
1663 dev_warn(wm8903->dev, "Write sequencer done\n"); in wm8903_irq()
1668 * invert the polarity of the interrupt after each event - to in wm8903_irq()
1673 mic_report = wm8903->mic_last_report; in wm8903_irq()
1674 ret = regmap_read(wm8903->regmap, WM8903_INTERRUPT_POLARITY_1, in wm8903_irq()
1677 dev_err(wm8903->dev, "Failed to read interrupt polarity: %d\n", in wm8903_irq()
1684 trace_snd_soc_jack_irq(dev_name(wm8903->dev)); in wm8903_irq()
1688 dev_dbg(wm8903->dev, "Microphone short (pol=%x)\n", int_pol); in wm8903_irq()
1690 mic_report ^= wm8903->mic_short; in wm8903_irq()
1695 dev_dbg(wm8903->dev, "Microphone detect (pol=%x)\n", int_pol); in wm8903_irq()
1697 mic_report ^= wm8903->mic_det; in wm8903_irq()
1700 msleep(wm8903->mic_delay); in wm8903_irq()
1703 regmap_update_bits(wm8903->regmap, WM8903_INTERRUPT_POLARITY_1, in wm8903_irq()
1706 snd_soc_jack_report(wm8903->mic_jack, mic_report, in wm8903_irq()
1707 wm8903->mic_short | wm8903->mic_det); in wm8903_irq()
1709 wm8903->mic_last_report = mic_report; in wm8903_irq()
1745 .name = "wm8903-hifi",
1768 regcache_sync(wm8903->regmap); in wm8903_resume()
1777 return -EINVAL; in wm8903_gpio_request()
1792 ret = regmap_update_bits(wm8903->regmap, in wm8903_gpio_direction_in()
1805 regmap_read(wm8903->regmap, WM8903_GPIO_CONTROL_1 + offset, &reg); in wm8903_gpio_get()
1821 ret = regmap_update_bits(wm8903->regmap, in wm8903_gpio_direction_out()
1833 regmap_update_bits(wm8903->regmap, WM8903_GPIO_CONTROL_1 + offset, in wm8903_gpio_set()
1851 struct wm8903_platform_data *pdata = wm8903->pdata; in wm8903_init_gpio()
1854 wm8903->gpio_chip = wm8903_template_chip; in wm8903_init_gpio()
1855 wm8903->gpio_chip.ngpio = WM8903_NUM_GPIO; in wm8903_init_gpio()
1856 wm8903->gpio_chip.parent = wm8903->dev; in wm8903_init_gpio()
1858 if (pdata->gpio_base) in wm8903_init_gpio()
1859 wm8903->gpio_chip.base = pdata->gpio_base; in wm8903_init_gpio()
1861 wm8903->gpio_chip.base = -1; in wm8903_init_gpio()
1863 ret = gpiochip_add_data(&wm8903->gpio_chip, wm8903); in wm8903_init_gpio()
1865 dev_err(wm8903->dev, "Failed to add GPIOs: %d\n", ret); in wm8903_init_gpio()
1870 gpiochip_remove(&wm8903->gpio_chip); in wm8903_free_gpio()
1914 struct irq_data *irq_data = irq_get_irq_data(i2c->irq); in wm8903_set_pdata_irq_trigger()
1916 dev_err(&i2c->dev, "Invalid IRQ: %d\n", in wm8903_set_pdata_irq_trigger()
1917 i2c->irq); in wm8903_set_pdata_irq_trigger()
1918 return -EINVAL; in wm8903_set_pdata_irq_trigger()
1926 * so we are able to select active-high in wm8903_set_pdata_irq_trigger()
1930 pdata->irq_active_low = false; in wm8903_set_pdata_irq_trigger()
1933 pdata->irq_active_low = true; in wm8903_set_pdata_irq_trigger()
1943 const struct device_node *np = i2c->dev.of_node; in wm8903_set_pdata_from_of()
1947 if (of_property_read_u32(np, "micdet-cfg", &val32) >= 0) in wm8903_set_pdata_from_of()
1948 pdata->micdet_cfg = val32; in wm8903_set_pdata_from_of()
1950 if (of_property_read_u32(np, "micdet-delay", &val32) >= 0) in wm8903_set_pdata_from_of()
1951 pdata->micdet_delay = val32; in wm8903_set_pdata_from_of()
1953 if (of_property_read_u32_array(np, "gpio-cfg", pdata->gpio_cfg, in wm8903_set_pdata_from_of()
1954 ARRAY_SIZE(pdata->gpio_cfg)) >= 0) { in wm8903_set_pdata_from_of()
1967 for (i = 0; i < ARRAY_SIZE(pdata->gpio_cfg); i++) { in wm8903_set_pdata_from_of()
1968 if (pdata->gpio_cfg[i] == 0) { in wm8903_set_pdata_from_of()
1969 pdata->gpio_cfg[i] = WM8903_GPIO_CONFIG_ZERO; in wm8903_set_pdata_from_of()
1970 } else if (pdata->gpio_cfg[i] == 0xffffffff) { in wm8903_set_pdata_from_of()
1971 pdata->gpio_cfg[i] = 0; in wm8903_set_pdata_from_of()
1972 } else if (pdata->gpio_cfg[i] > 0x7fff) { in wm8903_set_pdata_from_of()
1973 dev_err(&i2c->dev, "Invalid gpio-cfg[%d] %x\n", in wm8903_set_pdata_from_of()
1974 i, pdata->gpio_cfg[i]); in wm8903_set_pdata_from_of()
1975 return -EINVAL; in wm8903_set_pdata_from_of()
1985 struct wm8903_platform_data *pdata = dev_get_platdata(&i2c->dev); in wm8903_i2c_probe()
1992 wm8903 = devm_kzalloc(&i2c->dev, sizeof(*wm8903), GFP_KERNEL); in wm8903_i2c_probe()
1994 return -ENOMEM; in wm8903_i2c_probe()
1996 mutex_init(&wm8903->lock); in wm8903_i2c_probe()
1997 wm8903->dev = &i2c->dev; in wm8903_i2c_probe()
1999 wm8903->regmap = devm_regmap_init_i2c(i2c, &wm8903_regmap); in wm8903_i2c_probe()
2000 if (IS_ERR(wm8903->regmap)) { in wm8903_i2c_probe()
2001 ret = PTR_ERR(wm8903->regmap); in wm8903_i2c_probe()
2002 dev_err(&i2c->dev, "Failed to allocate register map: %d\n", in wm8903_i2c_probe()
2011 wm8903->pdata = pdata; in wm8903_i2c_probe()
2013 wm8903->pdata = devm_kzalloc(&i2c->dev, sizeof(*wm8903->pdata), in wm8903_i2c_probe()
2015 if (!wm8903->pdata) in wm8903_i2c_probe()
2016 return -ENOMEM; in wm8903_i2c_probe()
2018 if (i2c->irq) { in wm8903_i2c_probe()
2019 ret = wm8903_set_pdata_irq_trigger(i2c, wm8903->pdata); in wm8903_i2c_probe()
2024 if (i2c->dev.of_node) { in wm8903_i2c_probe()
2025 ret = wm8903_set_pdata_from_of(i2c, wm8903->pdata); in wm8903_i2c_probe()
2031 pdata = wm8903->pdata; in wm8903_i2c_probe()
2033 for (i = 0; i < ARRAY_SIZE(wm8903->supplies); i++) in wm8903_i2c_probe()
2034 wm8903->supplies[i].supply = wm8903_supply_names[i]; in wm8903_i2c_probe()
2036 ret = devm_regulator_bulk_get(&i2c->dev, ARRAY_SIZE(wm8903->supplies), in wm8903_i2c_probe()
2037 wm8903->supplies); in wm8903_i2c_probe()
2039 dev_err(&i2c->dev, "Failed to request supplies: %d\n", ret); in wm8903_i2c_probe()
2043 ret = regulator_bulk_enable(ARRAY_SIZE(wm8903->supplies), in wm8903_i2c_probe()
2044 wm8903->supplies); in wm8903_i2c_probe()
2046 dev_err(&i2c->dev, "Failed to enable supplies: %d\n", ret); in wm8903_i2c_probe()
2050 ret = regmap_read(wm8903->regmap, WM8903_SW_RESET_AND_ID, &val); in wm8903_i2c_probe()
2052 dev_err(&i2c->dev, "Failed to read chip ID: %d\n", ret); in wm8903_i2c_probe()
2056 dev_err(&i2c->dev, "Device with ID %x is not a WM8903\n", val); in wm8903_i2c_probe()
2057 ret = -ENODEV; in wm8903_i2c_probe()
2061 ret = regmap_read(wm8903->regmap, WM8903_REVISION_NUMBER, &val); in wm8903_i2c_probe()
2063 dev_err(&i2c->dev, "Failed to read chip revision: %d\n", ret); in wm8903_i2c_probe()
2066 dev_info(&i2c->dev, "WM8903 revision %c\n", in wm8903_i2c_probe()
2070 regmap_write(wm8903->regmap, WM8903_SW_RESET_AND_ID, 0x8903); in wm8903_i2c_probe()
2075 for (i = 0; i < ARRAY_SIZE(pdata->gpio_cfg); i++) { in wm8903_i2c_probe()
2076 if ((!pdata->gpio_cfg[i]) || in wm8903_i2c_probe()
2077 (pdata->gpio_cfg[i] > WM8903_GPIO_CONFIG_ZERO)) in wm8903_i2c_probe()
2080 regmap_write(wm8903->regmap, WM8903_GPIO_CONTROL_1 + i, in wm8903_i2c_probe()
2081 pdata->gpio_cfg[i] & 0x7fff); in wm8903_i2c_probe()
2083 val = (pdata->gpio_cfg[i] & WM8903_GP1_FN_MASK) in wm8903_i2c_probe()
2097 regmap_write(wm8903->regmap, WM8903_MIC_BIAS_CONTROL_0, in wm8903_i2c_probe()
2098 pdata->micdet_cfg); in wm8903_i2c_probe()
2101 if (pdata->micdet_cfg) in wm8903_i2c_probe()
2102 regmap_update_bits(wm8903->regmap, WM8903_WRITE_SEQUENCER_0, in wm8903_i2c_probe()
2111 WARN_ON(!mic_gpio && (pdata->micdet_cfg & WM8903_MICDET_ENA)); in wm8903_i2c_probe()
2113 wm8903->mic_delay = pdata->micdet_delay; in wm8903_i2c_probe()
2115 if (i2c->irq) { in wm8903_i2c_probe()
2116 if (pdata->irq_active_low) { in wm8903_i2c_probe()
2124 regmap_update_bits(wm8903->regmap, WM8903_INTERRUPT_CONTROL, in wm8903_i2c_probe()
2127 ret = request_threaded_irq(i2c->irq, NULL, wm8903_irq, in wm8903_i2c_probe()
2131 dev_err(wm8903->dev, "Failed to request IRQ: %d\n", in wm8903_i2c_probe()
2137 regmap_update_bits(wm8903->regmap, in wm8903_i2c_probe()
2143 regmap_update_bits(wm8903->regmap, WM8903_ADC_DIGITAL_VOLUME_LEFT, in wm8903_i2c_probe()
2145 regmap_update_bits(wm8903->regmap, WM8903_ADC_DIGITAL_VOLUME_RIGHT, in wm8903_i2c_probe()
2148 regmap_update_bits(wm8903->regmap, WM8903_DAC_DIGITAL_VOLUME_LEFT, in wm8903_i2c_probe()
2150 regmap_update_bits(wm8903->regmap, WM8903_DAC_DIGITAL_VOLUME_RIGHT, in wm8903_i2c_probe()
2153 regmap_update_bits(wm8903->regmap, WM8903_ANALOGUE_OUT1_LEFT, in wm8903_i2c_probe()
2155 regmap_update_bits(wm8903->regmap, WM8903_ANALOGUE_OUT1_RIGHT, in wm8903_i2c_probe()
2158 regmap_update_bits(wm8903->regmap, WM8903_ANALOGUE_OUT2_LEFT, in wm8903_i2c_probe()
2160 regmap_update_bits(wm8903->regmap, WM8903_ANALOGUE_OUT2_RIGHT, in wm8903_i2c_probe()
2163 regmap_update_bits(wm8903->regmap, WM8903_ANALOGUE_OUT3_LEFT, in wm8903_i2c_probe()
2165 regmap_update_bits(wm8903->regmap, WM8903_ANALOGUE_OUT3_RIGHT, in wm8903_i2c_probe()
2169 regmap_update_bits(wm8903->regmap, WM8903_DAC_DIGITAL_1, in wm8903_i2c_probe()
2173 ret = devm_snd_soc_register_component(&i2c->dev, in wm8903_i2c_probe()
2180 regulator_bulk_disable(ARRAY_SIZE(wm8903->supplies), in wm8903_i2c_probe()
2181 wm8903->supplies); in wm8903_i2c_probe()
2189 regulator_bulk_disable(ARRAY_SIZE(wm8903->supplies), in wm8903_i2c_remove()
2190 wm8903->supplies); in wm8903_i2c_remove()
2191 if (client->irq) in wm8903_i2c_remove()
2192 free_irq(client->irq, wm8903); in wm8903_i2c_remove()