Lines Matching full:component
12 #include <linux/component.h>
313 static int wcd938x_set_swr_clk_rate(struct snd_soc_component *component, int rate, int bank)
336 snd_soc_component_update_bits(component, WCD938X_DIGITAL_SWR_TX_CLK_RATE,
427 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
431 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_ANA_CLK_CTL,
433 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
435 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_RX0_CTL,
437 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_RX1_CTL,
439 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_RX2_CTL,
441 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_ANA_CLK_CTL,
443 snd_soc_component_write_field(component, WCD938X_AUX_AUXPA,
447 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
449 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
451 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
453 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_ANA_CLK_CTL,
455 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_ANA_CLK_CTL,
466 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
467 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
471 snd_soc_component_write_field(component,
474 snd_soc_component_write_field(component,
477 snd_soc_component_write_field(component,
482 snd_soc_component_write_field(component,
486 snd_soc_component_write_field(component,
490 if (!wcd938x->comp2_enable || (snd_soc_component_read(component,
493 snd_soc_component_write_field(component, WCD938X_HPH_NEW_INT_HPH_TIMER1,
496 snd_soc_component_write_field(component,
499 snd_soc_component_write_field(component,
507 snd_soc_component_write_field(component,
520 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
521 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
525 snd_soc_component_write_field(component,
528 snd_soc_component_write_field(component,
531 snd_soc_component_write_field(component,
536 snd_soc_component_write_field(component,
540 snd_soc_component_write_field(component,
545 (snd_soc_component_read(component,
548 snd_soc_component_write_field(component, WCD938X_HPH_NEW_INT_HPH_TIMER1,
551 snd_soc_component_write_field(component,
554 snd_soc_component_write_field(component,
561 snd_soc_component_write_field(component,
574 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
575 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
581 component, WCD938X_DIGITAL_CDC_EAR_PATH_CTL);
583 snd_soc_component_write_field(component,
586 snd_soc_component_write_field(component,
589 snd_soc_component_write_field(component,
592 snd_soc_component_write_field(component,
596 snd_soc_component_write_field(component,
599 snd_soc_component_write_field(component,
603 snd_soc_component_write_field(component,
610 snd_soc_component_write_field(component, WCD938X_FLYBACK_EN,
620 snd_soc_component_write_field(component,
623 snd_soc_component_write_field(component,
627 snd_soc_component_write_field(component,
630 snd_soc_component_write_field(component,
634 snd_soc_component_write_field(component,
638 snd_soc_component_write_field(component, WCD938X_ANA_EAR_COMPANDER_CTL,
640 snd_soc_component_write_field(component,
653 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
654 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
658 snd_soc_component_write_field(component,
661 snd_soc_component_write_field(component,
664 snd_soc_component_write_field(component,
668 snd_soc_component_write_field(component, WCD938X_FLYBACK_EN,
677 snd_soc_component_write_field(component,
689 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
690 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
696 snd_soc_component_write_field(component, WCD938X_LDOH_MODE,
704 snd_soc_component_write_field(component,
708 snd_soc_component_write_field(component, WCD938X_ANA_HPH,
714 snd_soc_component_write_field(component,
732 snd_soc_component_write_field(component,
737 snd_soc_component_write_field(component, WCD938X_HPH_NEW_INT_HPH_TIMER1,
741 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
757 snd_soc_component_write_field(component, WCD938X_ANA_HPH,
778 snd_soc_component_write_field(component, WCD938X_ANA_HPH,
780 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL1,
785 snd_soc_component_write_field(component, WCD938X_LDOH_MODE,
796 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
797 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
803 snd_soc_component_write_field(component, WCD938X_LDOH_MODE,
810 snd_soc_component_write_field(component,
814 snd_soc_component_write_field(component, WCD938X_ANA_HPH,
820 snd_soc_component_write_field(component,
837 snd_soc_component_write_field(component,
843 snd_soc_component_write_field(component, WCD938X_HPH_NEW_INT_HPH_TIMER1,
847 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
863 snd_soc_component_write_field(component, WCD938X_ANA_HPH,
883 snd_soc_component_write_field(component, WCD938X_ANA_HPH,
885 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL0,
890 snd_soc_component_write_field(component, WCD938X_LDOH_MODE,
901 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
902 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
907 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL2,
915 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
926 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL2,
935 snd_soc_component_write_field(component, WCD938X_FLYBACK_EN,
945 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
946 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
955 wcd938x->ear_rx_path = snd_soc_component_read(component,
958 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL2,
961 snd_soc_component_write_field(component,
965 snd_soc_component_write_field(component,
975 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
991 snd_soc_component_write_field(component, WCD938X_ANA_EAR_COMPANDER_CTL,
996 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL2,
999 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL0,
1007 snd_soc_component_write_field(component, WCD938X_FLYBACK_EN,
1019 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1053 dev_err(component->dev, "%s: Invalid DMIC Selection\n",
1060 snd_soc_component_write_field(component,
1067 snd_soc_component_write_field(component, dmic_clk_reg,
1070 snd_soc_component_write_field(component, dmic_clk_en_reg,
1073 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_DMIC_CTL,
1077 snd_soc_component_write_field(component,
1080 snd_soc_component_write_field(component, dmic_clk_en_reg,
1090 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1091 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1120 wcd938x_set_swr_clk_rate(component, rate, bank);
1122 wcd938x_set_swr_clk_rate(component, rate, !bank);
1128 wcd938x_set_swr_clk_rate(component, rate, !bank);
1129 wcd938x_set_swr_clk_rate(component, rate, bank);
1173 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1174 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1178 snd_soc_component_write_field(component,
1181 snd_soc_component_write_field(component,
1187 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_ANA_CLK_CTL,
1196 static void wcd938x_tx_channel_config(struct snd_soc_component *component,
1222 snd_soc_component_write_field(component, reg, mask, mode);
1228 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1229 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1234 snd_soc_component_write_field(component,
1237 snd_soc_component_write_field(component,
1240 wcd938x_tx_channel_config(component, w->shift, 1);
1243 dev_info(component->dev, "Invalid ADC mode\n");
1248 snd_soc_component_write_field(component,
1251 snd_soc_component_write_field(component,
1256 snd_soc_component_write_field(component,
1259 snd_soc_component_write_field(component,
1264 snd_soc_component_write_field(component,
1267 snd_soc_component_write_field(component,
1272 snd_soc_component_write_field(component,
1275 snd_soc_component_write_field(component,
1283 wcd938x_tx_channel_config(component, w->shift, 0);
1288 snd_soc_component_write_field(component,
1291 snd_soc_component_write_field(component,
1296 snd_soc_component_write_field(component,
1299 snd_soc_component_write_field(component,
1304 snd_soc_component_write_field(component,
1307 snd_soc_component_write_field(component,
1312 snd_soc_component_write_field(component,
1315 snd_soc_component_write_field(component,
1322 snd_soc_component_write_field(component,
1331 static int wcd938x_micbias_control(struct snd_soc_component *component,
1334 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1352 dev_err(component->dev, "%s: Invalid micbias number: %d\n",
1362 snd_soc_component_write_field(component, micb_reg,
1372 snd_soc_component_write_field(component, micb_reg,
1378 snd_soc_component_write_field(component,
1381 snd_soc_component_write_field(component,
1384 snd_soc_component_write_field(component,
1388 snd_soc_component_write_field(component, micb_reg,
1407 snd_soc_component_write_field(component, micb_reg,
1416 snd_soc_component_write_field(component, micb_reg,
1435 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1440 wcd938x_micbias_control(component, micb_num, MICB_ENABLE, true);
1447 wcd938x_micbias_control(component, micb_num, MICB_DISABLE, true);
1458 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1463 wcd938x_micbias_control(component, micb_num,
1471 wcd938x_micbias_control(component, micb_num,
1482 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1483 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1495 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1496 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1511 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1512 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1522 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1523 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1536 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1537 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1540 dev_err(component->dev, "Can not set EAR PA Gain, compander1 is enabled\n");
1544 snd_soc_component_write_field(component, WCD938X_ANA_EAR_COMPANDER_CTL,
1555 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1556 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1574 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1575 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1605 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1606 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1616 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1617 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1892 static void wcd938x_mbhc_clk_setup(struct snd_soc_component *component,
1895 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_1,
1899 static void wcd938x_mbhc_mbhc_bias_control(struct snd_soc_component *component,
1902 snd_soc_component_write_field(component, WCD938X_ANA_MBHC_ELECT,
1906 static void wcd938x_mbhc_program_btn_thr(struct snd_soc_component *component,
1913 dev_err(component->dev, "%s: invalid number of buttons: %d\n",
1920 snd_soc_component_write_field(component, WCD938X_ANA_MBHC_BTN0 + i,
1922 dev_dbg(component->dev, "%s: btn_high[%d]: %d, vth: %d\n",
1927 static bool wcd938x_mbhc_micb_en_status(struct snd_soc_component *component, int micb_num)
1932 val = snd_soc_component_read_field(component,
1941 static void wcd938x_mbhc_hph_l_pull_up_control(struct snd_soc_component *component,
1948 snd_soc_component_write_field(component,
1953 static int wcd938x_mbhc_request_micbias(struct snd_soc_component *component,
1956 return wcd938x_micbias_control(component, micb_num, req, false);
1959 static void wcd938x_mbhc_micb_ramp_control(struct snd_soc_component *component,
1963 snd_soc_component_write_field(component, WCD938X_ANA_MICB2_RAMP,
1965 snd_soc_component_write_field(component, WCD938X_ANA_MICB2_RAMP,
1968 snd_soc_component_write_field(component, WCD938X_ANA_MICB2_RAMP,
1970 snd_soc_component_write_field(component, WCD938X_ANA_MICB2_RAMP,
1975 static int wcd938x_mbhc_micb_adjust_voltage(struct snd_soc_component *component,
1978 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2006 micb_en = snd_soc_component_read_field(component, micb_reg,
2008 cur_vout_ctl = snd_soc_component_read_field(component, micb_reg,
2011 req_vout_ctl = wcd_get_micb_vout_ctl_val(component->dev, req_volt);
2023 snd_soc_component_write_field(component, micb_reg,
2027 snd_soc_component_write_field(component, micb_reg,
2032 snd_soc_component_write_field(component, micb_reg,
2046 static int wcd938x_mbhc_micb_ctrl_threshold_mic(struct snd_soc_component *component,
2049 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2064 return wcd938x_mbhc_micb_adjust_voltage(component, micb_mv, MIC_BIAS_2);
2067 static void wcd938x_mbhc_get_result_params(struct snd_soc_component *component,
2071 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2098 dev_err(component->dev, "Impedance detect ramp error, c1=%d, x1=0x%x\n",
2109 dev_dbg(component->dev, "%s: d1=%d, c1=%d, x1=0x%x, z_val=%d (milliohm)\n",
2127 static void wcd938x_mbhc_zdet_ramp(struct snd_soc_component *component,
2131 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2134 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_ZDET_ANA_CTL,
2136 snd_soc_component_update_bits(component, WCD938X_ANA_MBHC_BTN5,
2138 snd_soc_component_update_bits(component, WCD938X_ANA_MBHC_BTN6,
2140 snd_soc_component_update_bits(component, WCD938X_ANA_MBHC_BTN7,
2142 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_ZDET_ANA_CTL,
2144 snd_soc_component_update_bits(component, WCD938X_MBHC_NEW_ZDET_RAMP_CTL,
2152 dev_dbg(component->dev, "%s: ramp for HPH_L, noff = %d\n",
2154 wcd938x_mbhc_get_result_params(component, d1_a, zdet_param->noff, &zdet);
2166 dev_dbg(component->dev, "%s: ramp for HPH_R, noff = %d\n",
2168 wcd938x_mbhc_get_result_params(component, d1_a, zdet_param->noff, &zdet);
2175 static void wcd938x_wcd_mbhc_qfuse_cal(struct snd_soc_component *component,
2182 q1 = snd_soc_component_read(component,
2185 q1 = snd_soc_component_read(component,
2195 static void wcd938x_wcd_mbhc_calc_impedance(struct snd_soc_component *component,
2198 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2218 reg0 = snd_soc_component_read(component, WCD938X_ANA_MBHC_BTN5);
2219 reg1 = snd_soc_component_read(component, WCD938X_ANA_MBHC_BTN6);
2220 reg2 = snd_soc_component_read(component, WCD938X_ANA_MBHC_BTN7);
2221 reg3 = snd_soc_component_read(component, WCD938X_MBHC_CTL_CLK);
2222 reg4 = snd_soc_component_read(component, WCD938X_MBHC_NEW_ZDET_ANA_CTL);
2224 if (snd_soc_component_read(component, WCD938X_ANA_MBHC_ELECT) & 0x80) {
2250 wcd938x_mbhc_zdet_ramp(component, zdet_param_ptr, &z1L, NULL, d1);
2267 wcd938x_mbhc_zdet_ramp(component, zdet_param_ptr, &z1L, NULL, d1);
2277 wcd938x_wcd_mbhc_qfuse_cal(component, zl, 0);
2279 dev_dbg(component->dev, "%s: impedance on HPH_L = %d(ohms)\n",
2283 wcd938x_mbhc_zdet_ramp(component, zdet_param_ptr, NULL, &z1R, d1);
2301 wcd938x_mbhc_zdet_ramp(component, zdet_param_ptr, NULL, &z1R, d1);
2309 wcd938x_wcd_mbhc_qfuse_cal(component, zr, 1);
2311 dev_dbg(component->dev, "%s: impedance on HPH_R = %d(ohms)\n",
2317 dev_dbg(component->dev,
2326 dev_dbg(component->dev,
2332 snd_soc_component_write_field(component, WCD938X_HPH_R_ATEST,
2334 snd_soc_component_write_field(component, WCD938X_HPH_PA_CTL2,
2337 wcd938x_mbhc_zdet_ramp(component, &zdet_param[0], &z1Ls, NULL, d1);
2339 wcd938x_mbhc_zdet_ramp(component, &zdet_param[1], &z1Ls, NULL, d1);
2340 snd_soc_component_write_field(component, WCD938X_HPH_PA_CTL2,
2342 snd_soc_component_write_field(component, WCD938X_HPH_R_ATEST,
2345 wcd938x_wcd_mbhc_qfuse_cal(component, &z1Ls, 0);
2351 dev_dbg(component->dev, "%s: stereo plug type detected\n",
2355 dev_dbg(component->dev, "%s: MONO plug type detected\n",
2364 snd_soc_component_write(component, WCD938X_ANA_MBHC_BTN5, reg0);
2365 snd_soc_component_write(component, WCD938X_ANA_MBHC_BTN6, reg1);
2366 snd_soc_component_write(component, WCD938X_ANA_MBHC_BTN7, reg2);
2376 snd_soc_component_write(component, WCD938X_MBHC_NEW_ZDET_ANA_CTL, reg4);
2377 snd_soc_component_write(component, WCD938X_MBHC_CTL_CLK, reg3);
2383 static void wcd938x_mbhc_gnd_det_ctrl(struct snd_soc_component *component,
2387 snd_soc_component_write_field(component, WCD938X_ANA_MBHC_MECH,
2389 snd_soc_component_write_field(component, WCD938X_ANA_MBHC_MECH,
2392 snd_soc_component_write_field(component, WCD938X_ANA_MBHC_MECH,
2394 snd_soc_component_write_field(component, WCD938X_ANA_MBHC_MECH,
2399 static void wcd938x_mbhc_hph_pull_down_ctrl(struct snd_soc_component *component,
2402 snd_soc_component_write_field(component, WCD938X_HPH_PA_CTL2,
2404 snd_soc_component_write_field(component, WCD938X_HPH_PA_CTL2,
2408 static void wcd938x_mbhc_moisture_config(struct snd_soc_component *component)
2410 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2413 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2420 dev_dbg(component->dev, "%s: disable moisture detection for NC\n",
2422 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2427 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2431 static void wcd938x_mbhc_moisture_detect_en(struct snd_soc_component *component, bool enable)
2433 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2436 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2439 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2443 static bool wcd938x_mbhc_get_moisture_status(struct snd_soc_component *component)
2445 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2449 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2456 dev_dbg(component->dev, "%s: disable moisture detection for NC\n",
2458 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2467 if (snd_soc_component_read_field(component, WCD938X_MBHC_NEW_CTL_2, WCD938X_M_RTH_CTL_MASK))
2470 wcd938x_mbhc_moisture_detect_en(component, true);
2472 ret = ((snd_soc_component_read(component, WCD938X_MBHC_NEW_FSM_STATUS)
2480 static void wcd938x_mbhc_moisture_polling_ctrl(struct snd_soc_component *component,
2483 snd_soc_component_write_field(component,
2509 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
2510 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2523 struct snd_soc_component *component =
2525 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2530 dev_dbg(component->dev, "%s: zl=%u(ohms), zr=%u(ohms)\n", __func__, zl, zr);
2548 static int wcd938x_mbhc_init(struct snd_soc_component *component)
2550 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2568 wcd938x->wcd_mbhc = wcd_mbhc_init(component, &mbhc_cb, intr_ids, wcd_mbhc_fields, true);
2572 snd_soc_add_component_controls(component, impedance_detect_controls,
2574 snd_soc_add_component_controls(component, hph_type_detect_controls,
2580 static void wcd938x_mbhc_deinit(struct snd_soc_component *component)
2582 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
3017 static int wcd938x_soc_codec_probe(struct snd_soc_component *component)
3019 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
3021 struct device *dev = component->dev;
3033 snd_soc_component_init_regmap(component, wcd938x->regmap);
3039 variant = snd_soc_component_read_field(component,
3043 wcd938x->clsh_info = wcd_clsh_ctrl_alloc(component, WCD938X);
3097 ret = snd_soc_add_component_controls(component, wcd9380_snd_controls,
3100 dev_err(component->dev,
3107 ret = snd_soc_add_component_controls(component, wcd9385_snd_controls,
3110 dev_err(component->dev,
3120 ret = wcd938x_mbhc_init(component);
3122 dev_err(component->dev, "mbhc initialization failed\n");
3140 static void wcd938x_soc_codec_remove(struct snd_soc_component *component)
3142 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
3144 wcd938x_mbhc_deinit(component);
3180 static bool wcd938x_swap_gnd_mic(struct snd_soc_component *component)
3182 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
3183 struct device *dev = component->dev;