Lines Matching full:component

12 #include <linux/component.h>
319 static int wcd938x_set_swr_clk_rate(struct snd_soc_component *component, int rate, int bank)
342 snd_soc_component_update_bits(component, WCD938X_DIGITAL_SWR_TX_CLK_RATE,
433 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
437 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_ANA_CLK_CTL,
439 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
441 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_RX0_CTL,
443 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_RX1_CTL,
445 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_RX2_CTL,
447 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_ANA_CLK_CTL,
449 snd_soc_component_write_field(component, WCD938X_AUX_AUXPA,
453 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
455 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
457 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
459 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_ANA_CLK_CTL,
461 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_ANA_CLK_CTL,
472 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
473 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
477 snd_soc_component_write_field(component,
480 snd_soc_component_write_field(component,
483 snd_soc_component_write_field(component,
488 snd_soc_component_write_field(component,
492 snd_soc_component_write_field(component,
496 if (!wcd938x->comp2_enable || (snd_soc_component_read(component,
499 snd_soc_component_write_field(component, WCD938X_HPH_NEW_INT_HPH_TIMER1,
502 snd_soc_component_write_field(component,
505 snd_soc_component_write_field(component,
513 snd_soc_component_write_field(component,
526 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
527 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
531 snd_soc_component_write_field(component,
534 snd_soc_component_write_field(component,
537 snd_soc_component_write_field(component,
542 snd_soc_component_write_field(component,
546 snd_soc_component_write_field(component,
551 (snd_soc_component_read(component,
554 snd_soc_component_write_field(component, WCD938X_HPH_NEW_INT_HPH_TIMER1,
557 snd_soc_component_write_field(component,
560 snd_soc_component_write_field(component,
567 snd_soc_component_write_field(component,
580 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
581 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
587 component, WCD938X_DIGITAL_CDC_EAR_PATH_CTL);
589 snd_soc_component_write_field(component,
592 snd_soc_component_write_field(component,
595 snd_soc_component_write_field(component,
598 snd_soc_component_write_field(component,
602 snd_soc_component_write_field(component,
605 snd_soc_component_write_field(component,
609 snd_soc_component_write_field(component,
616 snd_soc_component_write_field(component, WCD938X_FLYBACK_EN,
626 snd_soc_component_write_field(component,
629 snd_soc_component_write_field(component,
633 snd_soc_component_write_field(component,
636 snd_soc_component_write_field(component,
640 snd_soc_component_write_field(component,
644 snd_soc_component_write_field(component, WCD938X_ANA_EAR_COMPANDER_CTL,
646 snd_soc_component_write_field(component,
659 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
660 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
664 snd_soc_component_write_field(component,
667 snd_soc_component_write_field(component,
670 snd_soc_component_write_field(component,
674 snd_soc_component_write_field(component, WCD938X_FLYBACK_EN,
683 snd_soc_component_write_field(component,
695 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
696 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
702 snd_soc_component_write_field(component, WCD938X_LDOH_MODE,
710 snd_soc_component_write_field(component,
714 snd_soc_component_write_field(component, WCD938X_ANA_HPH,
720 snd_soc_component_write_field(component,
738 snd_soc_component_write_field(component,
743 snd_soc_component_write_field(component, WCD938X_HPH_NEW_INT_HPH_TIMER1,
747 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
763 snd_soc_component_write_field(component, WCD938X_ANA_HPH,
784 snd_soc_component_write_field(component, WCD938X_ANA_HPH,
786 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL1,
791 snd_soc_component_write_field(component, WCD938X_LDOH_MODE,
802 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
803 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
809 snd_soc_component_write_field(component, WCD938X_LDOH_MODE,
816 snd_soc_component_write_field(component,
820 snd_soc_component_write_field(component, WCD938X_ANA_HPH,
826 snd_soc_component_write_field(component,
843 snd_soc_component_write_field(component,
849 snd_soc_component_write_field(component, WCD938X_HPH_NEW_INT_HPH_TIMER1,
853 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
869 snd_soc_component_write_field(component, WCD938X_ANA_HPH,
889 snd_soc_component_write_field(component, WCD938X_ANA_HPH,
891 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL0,
896 snd_soc_component_write_field(component, WCD938X_LDOH_MODE,
907 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
908 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
913 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL2,
921 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
932 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL2,
941 snd_soc_component_write_field(component, WCD938X_FLYBACK_EN,
951 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
952 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
961 wcd938x->ear_rx_path = snd_soc_component_read(component,
964 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL2,
967 snd_soc_component_write_field(component,
971 snd_soc_component_write_field(component,
981 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
997 snd_soc_component_write_field(component, WCD938X_ANA_EAR_COMPANDER_CTL,
1002 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL2,
1005 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL0,
1013 snd_soc_component_write_field(component, WCD938X_FLYBACK_EN,
1025 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1059 dev_err(component->dev, "%s: Invalid DMIC Selection\n",
1066 snd_soc_component_write_field(component,
1073 snd_soc_component_write_field(component, dmic_clk_reg,
1076 snd_soc_component_write_field(component, dmic_clk_en_reg,
1079 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_DMIC_CTL,
1083 snd_soc_component_write_field(component,
1086 snd_soc_component_write_field(component, dmic_clk_en_reg,
1096 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1097 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1127 wcd938x_set_swr_clk_rate(component, rate, bank);
1129 wcd938x_set_swr_clk_rate(component, rate, !bank);
1135 wcd938x_set_swr_clk_rate(component, rate, !bank);
1136 wcd938x_set_swr_clk_rate(component, rate, bank);
1180 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1181 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1185 snd_soc_component_write_field(component,
1188 snd_soc_component_write_field(component,
1194 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_ANA_CLK_CTL,
1203 static void wcd938x_tx_channel_config(struct snd_soc_component *component,
1229 snd_soc_component_write_field(component, reg, mask, mode);
1235 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1236 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1241 snd_soc_component_write_field(component,
1244 snd_soc_component_write_field(component,
1247 wcd938x_tx_channel_config(component, w->shift, 1);
1250 dev_info(component->dev, "Invalid ADC mode\n");
1255 snd_soc_component_write_field(component,
1258 snd_soc_component_write_field(component,
1263 snd_soc_component_write_field(component,
1266 snd_soc_component_write_field(component,
1271 snd_soc_component_write_field(component,
1274 snd_soc_component_write_field(component,
1279 snd_soc_component_write_field(component,
1282 snd_soc_component_write_field(component,
1290 wcd938x_tx_channel_config(component, w->shift, 0);
1295 snd_soc_component_write_field(component,
1298 snd_soc_component_write_field(component,
1303 snd_soc_component_write_field(component,
1306 snd_soc_component_write_field(component,
1311 snd_soc_component_write_field(component,
1314 snd_soc_component_write_field(component,
1319 snd_soc_component_write_field(component,
1322 snd_soc_component_write_field(component,
1329 snd_soc_component_write_field(component,
1338 static int wcd938x_micbias_control(struct snd_soc_component *component,
1341 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1359 dev_err(component->dev, "%s: Invalid micbias number: %d\n",
1369 snd_soc_component_write_field(component, micb_reg,
1379 snd_soc_component_write_field(component, micb_reg,
1385 snd_soc_component_write_field(component,
1388 snd_soc_component_write_field(component,
1391 snd_soc_component_write_field(component,
1395 snd_soc_component_write_field(component, micb_reg,
1414 snd_soc_component_write_field(component, micb_reg,
1423 snd_soc_component_write_field(component, micb_reg,
1442 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1447 wcd938x_micbias_control(component, micb_num, MICB_ENABLE, true);
1454 wcd938x_micbias_control(component, micb_num, MICB_DISABLE, true);
1465 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1470 wcd938x_micbias_control(component, micb_num,
1478 wcd938x_micbias_control(component, micb_num,
1489 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1490 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1502 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1503 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1518 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1519 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1529 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1530 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1543 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1544 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1547 dev_err(component->dev, "Can not set EAR PA Gain, compander1 is enabled\n");
1551 snd_soc_component_write_field(component, WCD938X_ANA_EAR_COMPANDER_CTL,
1562 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1563 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1581 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1582 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1612 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1613 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1623 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1624 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1899 static void wcd938x_mbhc_clk_setup(struct snd_soc_component *component,
1902 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_1,
1906 static void wcd938x_mbhc_mbhc_bias_control(struct snd_soc_component *component,
1909 snd_soc_component_write_field(component, WCD938X_ANA_MBHC_ELECT,
1913 static void wcd938x_mbhc_program_btn_thr(struct snd_soc_component *component,
1920 dev_err(component->dev, "%s: invalid number of buttons: %d\n",
1927 snd_soc_component_write_field(component, WCD938X_ANA_MBHC_BTN0 + i,
1929 dev_dbg(component->dev, "%s: btn_high[%d]: %d, vth: %d\n",
1934 static bool wcd938x_mbhc_micb_en_status(struct snd_soc_component *component, int micb_num)
1939 val = snd_soc_component_read_field(component,
1948 static void wcd938x_mbhc_hph_l_pull_up_control(struct snd_soc_component *component,
1955 snd_soc_component_write_field(component,
1960 static int wcd938x_mbhc_request_micbias(struct snd_soc_component *component,
1963 return wcd938x_micbias_control(component, micb_num, req, false);
1966 static void wcd938x_mbhc_micb_ramp_control(struct snd_soc_component *component,
1970 snd_soc_component_write_field(component, WCD938X_ANA_MICB2_RAMP,
1972 snd_soc_component_write_field(component, WCD938X_ANA_MICB2_RAMP,
1975 snd_soc_component_write_field(component, WCD938X_ANA_MICB2_RAMP,
1977 snd_soc_component_write_field(component, WCD938X_ANA_MICB2_RAMP,
1991 static int wcd938x_mbhc_micb_adjust_voltage(struct snd_soc_component *component,
1994 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2022 micb_en = snd_soc_component_read_field(component, micb_reg,
2024 cur_vout_ctl = snd_soc_component_read_field(component, micb_reg,
2039 snd_soc_component_write_field(component, micb_reg,
2043 snd_soc_component_write_field(component, micb_reg,
2048 snd_soc_component_write_field(component, micb_reg,
2062 static int wcd938x_mbhc_micb_ctrl_threshold_mic(struct snd_soc_component *component,
2065 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2080 return wcd938x_mbhc_micb_adjust_voltage(component, micb_mv, MIC_BIAS_2);
2083 static void wcd938x_mbhc_get_result_params(struct snd_soc_component *component,
2087 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2114 dev_err(component->dev, "Impedance detect ramp error, c1=%d, x1=0x%x\n",
2125 dev_dbg(component->dev, "%s: d1=%d, c1=%d, x1=0x%x, z_val=%d (milliohm)\n",
2143 static void wcd938x_mbhc_zdet_ramp(struct snd_soc_component *component,
2147 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2150 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_ZDET_ANA_CTL,
2152 snd_soc_component_update_bits(component, WCD938X_ANA_MBHC_BTN5,
2154 snd_soc_component_update_bits(component, WCD938X_ANA_MBHC_BTN6,
2156 snd_soc_component_update_bits(component, WCD938X_ANA_MBHC_BTN7,
2158 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_ZDET_ANA_CTL,
2160 snd_soc_component_update_bits(component, WCD938X_MBHC_NEW_ZDET_RAMP_CTL,
2168 dev_dbg(component->dev, "%s: ramp for HPH_L, noff = %d\n",
2170 wcd938x_mbhc_get_result_params(component, d1_a, zdet_param->noff, &zdet);
2182 dev_dbg(component->dev, "%s: ramp for HPH_R, noff = %d\n",
2184 wcd938x_mbhc_get_result_params(component, d1_a, zdet_param->noff, &zdet);
2191 static void wcd938x_wcd_mbhc_qfuse_cal(struct snd_soc_component *component,
2198 q1 = snd_soc_component_read(component,
2201 q1 = snd_soc_component_read(component,
2211 static void wcd938x_wcd_mbhc_calc_impedance(struct snd_soc_component *component,
2214 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2234 reg0 = snd_soc_component_read(component, WCD938X_ANA_MBHC_BTN5);
2235 reg1 = snd_soc_component_read(component, WCD938X_ANA_MBHC_BTN6);
2236 reg2 = snd_soc_component_read(component, WCD938X_ANA_MBHC_BTN7);
2237 reg3 = snd_soc_component_read(component, WCD938X_MBHC_CTL_CLK);
2238 reg4 = snd_soc_component_read(component, WCD938X_MBHC_NEW_ZDET_ANA_CTL);
2240 if (snd_soc_component_read(component, WCD938X_ANA_MBHC_ELECT) & 0x80) {
2266 wcd938x_mbhc_zdet_ramp(component, zdet_param_ptr, &z1L, NULL, d1);
2283 wcd938x_mbhc_zdet_ramp(component, zdet_param_ptr, &z1L, NULL, d1);
2293 wcd938x_wcd_mbhc_qfuse_cal(component, zl, 0);
2295 dev_dbg(component->dev, "%s: impedance on HPH_L = %d(ohms)\n",
2299 wcd938x_mbhc_zdet_ramp(component, zdet_param_ptr, NULL, &z1R, d1);
2317 wcd938x_mbhc_zdet_ramp(component, zdet_param_ptr, NULL, &z1R, d1);
2325 wcd938x_wcd_mbhc_qfuse_cal(component, zr, 1);
2327 dev_dbg(component->dev, "%s: impedance on HPH_R = %d(ohms)\n",
2333 dev_dbg(component->dev,
2342 dev_dbg(component->dev,
2348 snd_soc_component_write_field(component, WCD938X_HPH_R_ATEST,
2350 snd_soc_component_write_field(component, WCD938X_HPH_PA_CTL2,
2353 wcd938x_mbhc_zdet_ramp(component, &zdet_param[0], &z1Ls, NULL, d1);
2355 wcd938x_mbhc_zdet_ramp(component, &zdet_param[1], &z1Ls, NULL, d1);
2356 snd_soc_component_write_field(component, WCD938X_HPH_PA_CTL2,
2358 snd_soc_component_write_field(component, WCD938X_HPH_R_ATEST,
2361 wcd938x_wcd_mbhc_qfuse_cal(component, &z1Ls, 0);
2367 dev_dbg(component->dev, "%s: stereo plug type detected\n",
2371 dev_dbg(component->dev, "%s: MONO plug type detected\n",
2380 snd_soc_component_write(component, WCD938X_ANA_MBHC_BTN5, reg0);
2381 snd_soc_component_write(component, WCD938X_ANA_MBHC_BTN6, reg1);
2382 snd_soc_component_write(component, WCD938X_ANA_MBHC_BTN7, reg2);
2392 snd_soc_component_write(component, WCD938X_MBHC_NEW_ZDET_ANA_CTL, reg4);
2393 snd_soc_component_write(component, WCD938X_MBHC_CTL_CLK, reg3);
2399 static void wcd938x_mbhc_gnd_det_ctrl(struct snd_soc_component *component,
2403 snd_soc_component_write_field(component, WCD938X_ANA_MBHC_MECH,
2405 snd_soc_component_write_field(component, WCD938X_ANA_MBHC_MECH,
2408 snd_soc_component_write_field(component, WCD938X_ANA_MBHC_MECH,
2410 snd_soc_component_write_field(component, WCD938X_ANA_MBHC_MECH,
2415 static void wcd938x_mbhc_hph_pull_down_ctrl(struct snd_soc_component *component,
2418 snd_soc_component_write_field(component, WCD938X_HPH_PA_CTL2,
2420 snd_soc_component_write_field(component, WCD938X_HPH_PA_CTL2,
2424 static void wcd938x_mbhc_moisture_config(struct snd_soc_component *component)
2426 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2429 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2436 dev_dbg(component->dev, "%s: disable moisture detection for NC\n",
2438 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2443 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2447 static void wcd938x_mbhc_moisture_detect_en(struct snd_soc_component *component, bool enable)
2449 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2452 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2455 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2459 static bool wcd938x_mbhc_get_moisture_status(struct snd_soc_component *component)
2461 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2465 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2472 dev_dbg(component->dev, "%s: disable moisture detection for NC\n",
2474 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2483 if (snd_soc_component_read_field(component, WCD938X_MBHC_NEW_CTL_2, WCD938X_M_RTH_CTL_MASK))
2486 wcd938x_mbhc_moisture_detect_en(component, true);
2488 ret = ((snd_soc_component_read(component, WCD938X_MBHC_NEW_FSM_STATUS)
2496 static void wcd938x_mbhc_moisture_polling_ctrl(struct snd_soc_component *component,
2499 snd_soc_component_write_field(component,
2525 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
2526 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2539 struct snd_soc_component *component =
2541 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2546 dev_dbg(component->dev, "%s: zl=%u(ohms), zr=%u(ohms)\n", __func__, zl, zr);
2564 static int wcd938x_mbhc_init(struct snd_soc_component *component)
2566 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2584 wcd938x->wcd_mbhc = wcd_mbhc_init(component, &mbhc_cb, intr_ids, wcd_mbhc_fields, true);
2588 snd_soc_add_component_controls(component, impedance_detect_controls,
2590 snd_soc_add_component_controls(component, hph_type_detect_controls,
2596 static void wcd938x_mbhc_deinit(struct snd_soc_component *component)
2598 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
3045 static int wcd938x_soc_codec_probe(struct snd_soc_component *component)
3047 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
3049 struct device *dev = component->dev;
3060 snd_soc_component_init_regmap(component, wcd938x->regmap);
3066 wcd938x->variant = snd_soc_component_read_field(component,
3070 wcd938x->clsh_info = wcd_clsh_ctrl_alloc(component, WCD938X);
3124 ret = snd_soc_add_component_controls(component, wcd9380_snd_controls,
3127 dev_err(component->dev,
3134 ret = snd_soc_add_component_controls(component, wcd9385_snd_controls,
3137 dev_err(component->dev,
3147 ret = wcd938x_mbhc_init(component);
3149 dev_err(component->dev, "mbhc initialization failed\n");
3167 static void wcd938x_soc_codec_remove(struct snd_soc_component *component)
3169 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
3171 wcd938x_mbhc_deinit(component);
3238 static bool wcd938x_swap_gnd_mic(struct snd_soc_component *component, bool active)
3244 wcd938x = snd_soc_component_get_drvdata(component);