Lines Matching defs:component
298 struct snd_soc_component *component;
349 static void pm8916_wcd_analog_micbias_enable(struct snd_soc_component *component)
351 struct pm8916_wcd_analog_priv *wcd = snd_soc_component_get_drvdata(component);
353 snd_soc_component_update_bits(component, CDC_A_MICB_1_CTL,
360 snd_soc_component_update_bits(component, CDC_A_MICB_1_VAL,
371 snd_soc_component_update_bits(component, CDC_A_MICB_1_CTL,
377 static int pm8916_wcd_analog_enable_micbias(struct snd_soc_component *component,
382 pm8916_wcd_analog_micbias_enable(component);
383 snd_soc_component_update_bits(component, CDC_A_MICB_1_EN,
395 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
399 snd_soc_component_update_bits(component, CDC_A_MICB_1_EN,
412 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
413 struct pm8916_wcd_analog_priv *wcd = snd_soc_component_get_drvdata(component);
415 return pm8916_wcd_analog_enable_micbias(component, event,
423 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
424 struct pm8916_wcd_analog_priv *wcd = snd_soc_component_get_drvdata(component);
426 return pm8916_wcd_analog_enable_micbias(component, event,
434 struct snd_soc_component *component = priv->component;
440 snd_soc_component_update_bits(component, CDC_A_MICB_1_INT_RBIAS,
444 snd_soc_component_update_bits(component, CDC_A_MICB_2_EN,
448 snd_soc_component_update_bits(component, CDC_A_MBHC_FSM_CTL,
452 snd_soc_component_update_bits(component, CDC_A_MBHC_FSM_CTL,
469 snd_soc_component_update_bits(component, reg_addr,
480 struct snd_soc_component *component = wcd->component;
485 snd_soc_component_write(component, CDC_A_MBHC_DET_CTL_1,
497 snd_soc_component_write(component, CDC_A_MBHC_DET_CTL_2,
504 snd_soc_component_write(component, CDC_A_MBHC_DBNC_TIMER,
509 snd_soc_component_update_bits(component, CDC_D_CDC_DIG_CLK_CTL,
513 if (snd_soc_component_read(component, CDC_A_MICB_2_EN) & CDC_A_MICB_2_EN_ENABLE)
522 snd_soc_component_update_bits(component, CDC_D_INT_EN_CLR, int_en_mask, 0);
523 snd_soc_component_update_bits(component, CDC_D_INT_EN_SET, int_en_mask, int_en_mask);
533 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
534 struct pm8916_wcd_analog_priv *wcd = snd_soc_component_get_drvdata(component);
538 snd_soc_component_update_bits(component, CDC_A_MICB_2_EN,
556 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
568 snd_soc_component_update_bits(component, CDC_A_MICB_1_CTL,
577 snd_soc_component_update_bits(component, adc_reg, 1 << init_bit_shift,
581 snd_soc_component_update_bits(component, CDC_D_CDC_CONN_TX1_CTL,
587 snd_soc_component_update_bits(component, CDC_D_CDC_CONN_TX2_CTL,
599 snd_soc_component_update_bits(component, adc_reg, 1 << init_bit_shift, 0x00);
604 snd_soc_component_update_bits(component, CDC_D_CDC_CONN_TX1_CTL,
609 snd_soc_component_update_bits(component, CDC_A_MICB_1_CTL,
613 snd_soc_component_update_bits(component, CDC_D_CDC_CONN_TX2_CTL,
629 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
633 snd_soc_component_update_bits(component, CDC_A_SPKR_PWRSTG_CTL,
643 snd_soc_component_update_bits(component, CDC_A_RX_EAR_CTL,
648 snd_soc_component_update_bits(component, CDC_A_SPKR_DRV_CTL,
651 snd_soc_component_update_bits(component, w->reg,
656 snd_soc_component_update_bits(component, CDC_A_SPKR_PWRSTG_CTL,
662 snd_soc_component_update_bits(component, CDC_A_SPKR_DAC_CTL,
665 snd_soc_component_update_bits(component, CDC_A_RX_EAR_CTL,
676 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
680 snd_soc_component_update_bits(component, CDC_A_RX_EAR_CTL,
684 snd_soc_component_update_bits(component, CDC_A_RX_EAR_CTL,
689 snd_soc_component_update_bits(component, CDC_A_RX_EAR_CTL,
693 snd_soc_component_update_bits(component, CDC_A_RX_EAR_CTL,
719 static int pm8916_wcd_analog_probe(struct snd_soc_component *component)
721 struct pm8916_wcd_analog_priv *priv = dev_get_drvdata(component->dev);
726 dev_err(component->dev, "failed to enable regulators (%d)\n", err);
730 snd_soc_component_init_regmap(component,
731 dev_get_regmap(component->dev->parent, NULL));
732 snd_soc_component_set_drvdata(component, priv);
733 priv->pmic_rev = snd_soc_component_read(component, CDC_D_REVISION1);
734 priv->codec_version = snd_soc_component_read(component, CDC_D_PERPH_SUBTYPE);
736 dev_info(component->dev, "PMIC REV: %d\t CODEC Version: %d\n",
739 snd_soc_component_write(component, CDC_D_PERPH_RESET_CTL4, 0x01);
740 snd_soc_component_write(component, CDC_A_PERPH_RESET_CTL4, 0x01);
743 snd_soc_component_write(component, wcd_reg_defaults_2_0[reg].reg,
746 priv->component = component;
748 snd_soc_component_update_bits(component, CDC_D_CDC_RST_CTL,
757 static void pm8916_wcd_analog_remove(struct snd_soc_component *component)
759 struct pm8916_wcd_analog_priv *priv = dev_get_drvdata(component->dev);
761 snd_soc_component_update_bits(component, CDC_D_CDC_RST_CTL,
976 static int pm8916_wcd_analog_set_jack(struct snd_soc_component *component,
980 struct pm8916_wcd_analog_priv *wcd = snd_soc_component_get_drvdata(component);
992 struct snd_soc_component *component = priv->component;
993 u32 val = snd_soc_component_read(component, CDC_A_MBHC_RESULT_1);
1009 struct snd_soc_component *component = priv->component;
1012 btn_result = snd_soc_component_read(component, CDC_A_MBHC_RESULT_1) &
1035 dev_err(component->dev,
1046 struct snd_soc_component *component = priv->component;
1049 if (snd_soc_component_read(component, CDC_A_MBHC_DET_CTL_1) &
1054 snd_soc_component_update_bits(component, CDC_A_MBHC_DET_CTL_1,
1062 if (snd_soc_component_read(component, CDC_A_MICB_2_EN) &