Lines Matching defs:component

12 #include <linux/component.h>
338 static int wcd938x_set_swr_clk_rate(struct snd_soc_component *component, int rate, int bank)
361 snd_soc_component_update_bits(component, WCD938X_DIGITAL_SWR_TX_CLK_RATE,
452 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
456 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_ANA_CLK_CTL,
458 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
460 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_RX0_CTL,
462 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_RX1_CTL,
464 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_RX2_CTL,
466 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_ANA_CLK_CTL,
468 snd_soc_component_write_field(component, WCD938X_AUX_AUXPA,
472 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
474 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
476 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
478 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_ANA_CLK_CTL,
480 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_ANA_CLK_CTL,
491 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
492 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
496 snd_soc_component_write_field(component,
499 snd_soc_component_write_field(component,
502 snd_soc_component_write_field(component,
507 snd_soc_component_write_field(component,
511 snd_soc_component_write_field(component,
515 if (!wcd938x->comp2_enable || (snd_soc_component_read(component,
518 snd_soc_component_write_field(component, WCD938X_HPH_NEW_INT_HPH_TIMER1,
521 snd_soc_component_write_field(component,
524 snd_soc_component_write_field(component,
532 snd_soc_component_write_field(component,
545 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
546 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
550 snd_soc_component_write_field(component,
553 snd_soc_component_write_field(component,
556 snd_soc_component_write_field(component,
561 snd_soc_component_write_field(component,
565 snd_soc_component_write_field(component,
570 (snd_soc_component_read(component,
573 snd_soc_component_write_field(component, WCD938X_HPH_NEW_INT_HPH_TIMER1,
576 snd_soc_component_write_field(component,
579 snd_soc_component_write_field(component,
586 snd_soc_component_write_field(component,
599 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
600 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
606 component, WCD938X_DIGITAL_CDC_EAR_PATH_CTL);
608 snd_soc_component_write_field(component,
611 snd_soc_component_write_field(component,
614 snd_soc_component_write_field(component,
617 snd_soc_component_write_field(component,
621 snd_soc_component_write_field(component,
624 snd_soc_component_write_field(component,
628 snd_soc_component_write_field(component,
635 snd_soc_component_write_field(component, WCD938X_FLYBACK_EN,
645 snd_soc_component_write_field(component,
648 snd_soc_component_write_field(component,
652 snd_soc_component_write_field(component,
655 snd_soc_component_write_field(component,
659 snd_soc_component_write_field(component,
663 snd_soc_component_write_field(component, WCD938X_ANA_EAR_COMPANDER_CTL,
665 snd_soc_component_write_field(component,
678 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
679 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
683 snd_soc_component_write_field(component,
686 snd_soc_component_write_field(component,
689 snd_soc_component_write_field(component,
693 snd_soc_component_write_field(component, WCD938X_FLYBACK_EN,
702 snd_soc_component_write_field(component,
714 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
715 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
721 snd_soc_component_write_field(component, WCD938X_LDOH_MODE,
729 snd_soc_component_write_field(component,
733 snd_soc_component_write_field(component, WCD938X_ANA_HPH,
739 snd_soc_component_write_field(component,
757 snd_soc_component_write_field(component,
762 snd_soc_component_write_field(component, WCD938X_HPH_NEW_INT_HPH_TIMER1,
766 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
782 snd_soc_component_write_field(component, WCD938X_ANA_HPH,
803 snd_soc_component_write_field(component, WCD938X_ANA_HPH,
805 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL1,
810 snd_soc_component_write_field(component, WCD938X_LDOH_MODE,
821 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
822 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
828 snd_soc_component_write_field(component, WCD938X_LDOH_MODE,
835 snd_soc_component_write_field(component,
839 snd_soc_component_write_field(component, WCD938X_ANA_HPH,
845 snd_soc_component_write_field(component,
862 snd_soc_component_write_field(component,
868 snd_soc_component_write_field(component, WCD938X_HPH_NEW_INT_HPH_TIMER1,
872 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
888 snd_soc_component_write_field(component, WCD938X_ANA_HPH,
908 snd_soc_component_write_field(component, WCD938X_ANA_HPH,
910 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL0,
915 snd_soc_component_write_field(component, WCD938X_LDOH_MODE,
926 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
927 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
932 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL2,
940 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
951 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL2,
960 snd_soc_component_write_field(component, WCD938X_FLYBACK_EN,
970 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
971 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
980 wcd938x->ear_rx_path = snd_soc_component_read(component,
983 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL2,
986 snd_soc_component_write_field(component,
990 snd_soc_component_write_field(component,
1000 snd_soc_component_write_field(component, WCD938X_ANA_RX_SUPPLIES,
1016 snd_soc_component_write_field(component, WCD938X_ANA_EAR_COMPANDER_CTL,
1021 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL2,
1024 snd_soc_component_write_field(component, WCD938X_DIGITAL_PDM_WD_CTL0,
1032 snd_soc_component_write_field(component, WCD938X_FLYBACK_EN,
1044 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1078 dev_err(component->dev, "%s: Invalid DMIC Selection\n",
1085 snd_soc_component_write_field(component,
1092 snd_soc_component_write_field(component, dmic_clk_reg,
1095 snd_soc_component_write_field(component, dmic_clk_en_reg,
1098 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_DMIC_CTL,
1102 snd_soc_component_write_field(component,
1105 snd_soc_component_write_field(component, dmic_clk_en_reg,
1115 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1116 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1146 wcd938x_set_swr_clk_rate(component, rate, bank);
1148 wcd938x_set_swr_clk_rate(component, rate, !bank);
1154 wcd938x_set_swr_clk_rate(component, rate, !bank);
1155 wcd938x_set_swr_clk_rate(component, rate, bank);
1199 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1200 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1204 snd_soc_component_write_field(component,
1207 snd_soc_component_write_field(component,
1213 snd_soc_component_write_field(component, WCD938X_DIGITAL_CDC_ANA_CLK_CTL,
1222 static void wcd938x_tx_channel_config(struct snd_soc_component *component,
1248 snd_soc_component_write_field(component, reg, mask, mode);
1254 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1255 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1260 snd_soc_component_write_field(component,
1263 snd_soc_component_write_field(component,
1266 wcd938x_tx_channel_config(component, w->shift, 1);
1269 dev_info(component->dev, "Invalid ADC mode\n");
1274 snd_soc_component_write_field(component,
1277 snd_soc_component_write_field(component,
1282 snd_soc_component_write_field(component,
1285 snd_soc_component_write_field(component,
1290 snd_soc_component_write_field(component,
1293 snd_soc_component_write_field(component,
1298 snd_soc_component_write_field(component,
1301 snd_soc_component_write_field(component,
1309 wcd938x_tx_channel_config(component, w->shift, 0);
1314 snd_soc_component_write_field(component,
1317 snd_soc_component_write_field(component,
1322 snd_soc_component_write_field(component,
1325 snd_soc_component_write_field(component,
1330 snd_soc_component_write_field(component,
1333 snd_soc_component_write_field(component,
1338 snd_soc_component_write_field(component,
1341 snd_soc_component_write_field(component,
1348 snd_soc_component_write_field(component,
1357 static int wcd938x_micbias_control(struct snd_soc_component *component,
1360 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1378 dev_err(component->dev, "%s: Invalid micbias number: %d\n",
1388 snd_soc_component_write_field(component, micb_reg,
1398 snd_soc_component_write_field(component, micb_reg,
1404 snd_soc_component_write_field(component,
1407 snd_soc_component_write_field(component,
1410 snd_soc_component_write_field(component,
1414 snd_soc_component_write_field(component, micb_reg,
1433 snd_soc_component_write_field(component, micb_reg,
1442 snd_soc_component_write_field(component, micb_reg,
1461 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1466 wcd938x_micbias_control(component, micb_num, MICB_ENABLE, true);
1473 wcd938x_micbias_control(component, micb_num, MICB_DISABLE, true);
1484 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
1489 wcd938x_micbias_control(component, micb_num,
1497 wcd938x_micbias_control(component, micb_num,
1508 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1509 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1521 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1522 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1537 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1538 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1548 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1549 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1562 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1563 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1566 dev_err(component->dev, "Can not set EAR PA Gain, compander1 is enabled\n");
1570 snd_soc_component_write_field(component, WCD938X_ANA_EAR_COMPANDER_CTL,
1581 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1582 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1600 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1601 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1631 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1632 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1642 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1643 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1656 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1657 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1667 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
1668 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
1943 static void wcd938x_mbhc_clk_setup(struct snd_soc_component *component,
1946 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_1,
1950 static void wcd938x_mbhc_mbhc_bias_control(struct snd_soc_component *component,
1953 snd_soc_component_write_field(component, WCD938X_ANA_MBHC_ELECT,
1957 static void wcd938x_mbhc_program_btn_thr(struct snd_soc_component *component,
1964 dev_err(component->dev, "%s: invalid number of buttons: %d\n",
1971 snd_soc_component_write_field(component, WCD938X_ANA_MBHC_BTN0 + i,
1973 dev_dbg(component->dev, "%s: btn_high[%d]: %d, vth: %d\n",
1978 static bool wcd938x_mbhc_micb_en_status(struct snd_soc_component *component, int micb_num)
1983 val = snd_soc_component_read_field(component,
1992 static void wcd938x_mbhc_hph_l_pull_up_control(struct snd_soc_component *component,
1999 snd_soc_component_write_field(component,
2004 static int wcd938x_mbhc_request_micbias(struct snd_soc_component *component,
2007 return wcd938x_micbias_control(component, micb_num, req, false);
2010 static void wcd938x_mbhc_micb_ramp_control(struct snd_soc_component *component,
2014 snd_soc_component_write_field(component, WCD938X_ANA_MICB2_RAMP,
2016 snd_soc_component_write_field(component, WCD938X_ANA_MICB2_RAMP,
2019 snd_soc_component_write_field(component, WCD938X_ANA_MICB2_RAMP,
2021 snd_soc_component_write_field(component, WCD938X_ANA_MICB2_RAMP,
2035 static int wcd938x_mbhc_micb_adjust_voltage(struct snd_soc_component *component,
2038 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2066 micb_en = snd_soc_component_read_field(component, micb_reg,
2068 cur_vout_ctl = snd_soc_component_read_field(component, micb_reg,
2083 snd_soc_component_write_field(component, micb_reg,
2087 snd_soc_component_write_field(component, micb_reg,
2092 snd_soc_component_write_field(component, micb_reg,
2106 static int wcd938x_mbhc_micb_ctrl_threshold_mic(struct snd_soc_component *component,
2109 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2124 return wcd938x_mbhc_micb_adjust_voltage(component, micb_mv, MIC_BIAS_2);
2127 static void wcd938x_mbhc_get_result_params(struct snd_soc_component *component,
2131 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2158 dev_err(component->dev, "Impedance detect ramp error, c1=%d, x1=0x%x\n",
2169 dev_dbg(component->dev, "%s: d1=%d, c1=%d, x1=0x%x, z_val=%d (milliohm)\n",
2187 static void wcd938x_mbhc_zdet_ramp(struct snd_soc_component *component,
2191 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2194 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_ZDET_ANA_CTL,
2196 snd_soc_component_update_bits(component, WCD938X_ANA_MBHC_BTN5,
2198 snd_soc_component_update_bits(component, WCD938X_ANA_MBHC_BTN6,
2200 snd_soc_component_update_bits(component, WCD938X_ANA_MBHC_BTN7,
2202 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_ZDET_ANA_CTL,
2204 snd_soc_component_update_bits(component, WCD938X_MBHC_NEW_ZDET_RAMP_CTL,
2212 dev_dbg(component->dev, "%s: ramp for HPH_L, noff = %d\n",
2214 wcd938x_mbhc_get_result_params(component, d1_a, zdet_param->noff, &zdet);
2226 dev_dbg(component->dev, "%s: ramp for HPH_R, noff = %d\n",
2228 wcd938x_mbhc_get_result_params(component, d1_a, zdet_param->noff, &zdet);
2235 static void wcd938x_wcd_mbhc_qfuse_cal(struct snd_soc_component *component,
2242 q1 = snd_soc_component_read(component,
2245 q1 = snd_soc_component_read(component,
2255 static void wcd938x_wcd_mbhc_calc_impedance(struct snd_soc_component *component,
2258 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2278 reg0 = snd_soc_component_read(component, WCD938X_ANA_MBHC_BTN5);
2279 reg1 = snd_soc_component_read(component, WCD938X_ANA_MBHC_BTN6);
2280 reg2 = snd_soc_component_read(component, WCD938X_ANA_MBHC_BTN7);
2281 reg3 = snd_soc_component_read(component, WCD938X_MBHC_CTL_CLK);
2282 reg4 = snd_soc_component_read(component, WCD938X_MBHC_NEW_ZDET_ANA_CTL);
2284 if (snd_soc_component_read(component, WCD938X_ANA_MBHC_ELECT) & 0x80) {
2310 wcd938x_mbhc_zdet_ramp(component, zdet_param_ptr, &z1L, NULL, d1);
2327 wcd938x_mbhc_zdet_ramp(component, zdet_param_ptr, &z1L, NULL, d1);
2337 wcd938x_wcd_mbhc_qfuse_cal(component, zl, 0);
2339 dev_dbg(component->dev, "%s: impedance on HPH_L = %d(ohms)\n",
2343 wcd938x_mbhc_zdet_ramp(component, zdet_param_ptr, NULL, &z1R, d1);
2361 wcd938x_mbhc_zdet_ramp(component, zdet_param_ptr, NULL, &z1R, d1);
2369 wcd938x_wcd_mbhc_qfuse_cal(component, zr, 1);
2371 dev_dbg(component->dev, "%s: impedance on HPH_R = %d(ohms)\n",
2377 dev_dbg(component->dev,
2386 dev_dbg(component->dev,
2392 snd_soc_component_write_field(component, WCD938X_HPH_R_ATEST,
2394 snd_soc_component_write_field(component, WCD938X_HPH_PA_CTL2,
2397 wcd938x_mbhc_zdet_ramp(component, &zdet_param[0], &z1Ls, NULL, d1);
2399 wcd938x_mbhc_zdet_ramp(component, &zdet_param[1], &z1Ls, NULL, d1);
2400 snd_soc_component_write_field(component, WCD938X_HPH_PA_CTL2,
2402 snd_soc_component_write_field(component, WCD938X_HPH_R_ATEST,
2405 wcd938x_wcd_mbhc_qfuse_cal(component, &z1Ls, 0);
2411 dev_dbg(component->dev, "%s: stereo plug type detected\n",
2415 dev_dbg(component->dev, "%s: MONO plug type detected\n",
2424 snd_soc_component_write(component, WCD938X_ANA_MBHC_BTN5, reg0);
2425 snd_soc_component_write(component, WCD938X_ANA_MBHC_BTN6, reg1);
2426 snd_soc_component_write(component, WCD938X_ANA_MBHC_BTN7, reg2);
2436 snd_soc_component_write(component, WCD938X_MBHC_NEW_ZDET_ANA_CTL, reg4);
2437 snd_soc_component_write(component, WCD938X_MBHC_CTL_CLK, reg3);
2443 static void wcd938x_mbhc_gnd_det_ctrl(struct snd_soc_component *component,
2447 snd_soc_component_write_field(component, WCD938X_ANA_MBHC_MECH,
2449 snd_soc_component_write_field(component, WCD938X_ANA_MBHC_MECH,
2452 snd_soc_component_write_field(component, WCD938X_ANA_MBHC_MECH,
2454 snd_soc_component_write_field(component, WCD938X_ANA_MBHC_MECH,
2459 static void wcd938x_mbhc_hph_pull_down_ctrl(struct snd_soc_component *component,
2462 snd_soc_component_write_field(component, WCD938X_HPH_PA_CTL2,
2464 snd_soc_component_write_field(component, WCD938X_HPH_PA_CTL2,
2468 static void wcd938x_mbhc_moisture_config(struct snd_soc_component *component)
2470 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2473 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2480 dev_dbg(component->dev, "%s: disable moisture detection for NC\n",
2482 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2487 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2491 static void wcd938x_mbhc_moisture_detect_en(struct snd_soc_component *component, bool enable)
2493 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2496 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2499 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2503 static bool wcd938x_mbhc_get_moisture_status(struct snd_soc_component *component)
2505 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2509 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2516 dev_dbg(component->dev, "%s: disable moisture detection for NC\n",
2518 snd_soc_component_write_field(component, WCD938X_MBHC_NEW_CTL_2,
2527 if (snd_soc_component_read_field(component, WCD938X_MBHC_NEW_CTL_2, WCD938X_M_RTH_CTL_MASK))
2530 wcd938x_mbhc_moisture_detect_en(component, true);
2532 ret = ((snd_soc_component_read(component, WCD938X_MBHC_NEW_FSM_STATUS)
2540 static void wcd938x_mbhc_moisture_polling_ctrl(struct snd_soc_component *component,
2543 snd_soc_component_write_field(component,
2569 struct snd_soc_component *component = snd_soc_kcontrol_component(kcontrol);
2570 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2583 struct snd_soc_component *component =
2585 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2590 dev_dbg(component->dev, "%s: zl=%u(ohms), zr=%u(ohms)\n", __func__, zl, zr);
2608 static int wcd938x_mbhc_init(struct snd_soc_component *component)
2610 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
2628 wcd938x->wcd_mbhc = wcd_mbhc_init(component, &mbhc_cb, intr_ids, wcd_mbhc_fields, true);
2632 snd_soc_add_component_controls(component, impedance_detect_controls,
2634 snd_soc_add_component_controls(component, hph_type_detect_controls,
2640 static void wcd938x_mbhc_deinit(struct snd_soc_component *component)
2642 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
3091 static int wcd938x_soc_codec_probe(struct snd_soc_component *component)
3093 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
3095 struct device *dev = component->dev;
3106 snd_soc_component_init_regmap(component, wcd938x->regmap);
3112 wcd938x->variant = snd_soc_component_read_field(component,
3116 wcd938x->clsh_info = wcd_clsh_ctrl_alloc(component, WCD938X);
3170 ret = snd_soc_add_component_controls(component, wcd9380_snd_controls,
3173 dev_err(component->dev,
3180 ret = snd_soc_add_component_controls(component, wcd9385_snd_controls,
3183 dev_err(component->dev,
3193 ret = wcd938x_mbhc_init(component);
3195 dev_err(component->dev, "mbhc initialization failed\n");
3213 static void wcd938x_soc_codec_remove(struct snd_soc_component *component)
3215 struct wcd938x_priv *wcd938x = snd_soc_component_get_drvdata(component);
3217 wcd938x_mbhc_deinit(component);
3284 static bool wcd938x_swap_gnd_mic(struct snd_soc_component *component, bool active)
3290 wcd938x = snd_soc_component_get_drvdata(component);