Lines Matching defs:component

297 	struct snd_soc_component *component;
348 static void pm8916_wcd_analog_micbias_enable(struct snd_soc_component *component)
350 struct pm8916_wcd_analog_priv *wcd = snd_soc_component_get_drvdata(component);
352 snd_soc_component_update_bits(component, CDC_A_MICB_1_CTL,
359 snd_soc_component_update_bits(component, CDC_A_MICB_1_VAL,
370 snd_soc_component_update_bits(component, CDC_A_MICB_1_CTL,
376 static int pm8916_wcd_analog_enable_micbias(struct snd_soc_component *component,
381 pm8916_wcd_analog_micbias_enable(component);
382 snd_soc_component_update_bits(component, CDC_A_MICB_1_EN,
394 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
398 snd_soc_component_update_bits(component, CDC_A_MICB_1_EN,
411 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
412 struct pm8916_wcd_analog_priv *wcd = snd_soc_component_get_drvdata(component);
414 return pm8916_wcd_analog_enable_micbias(component, event,
422 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
423 struct pm8916_wcd_analog_priv *wcd = snd_soc_component_get_drvdata(component);
425 return pm8916_wcd_analog_enable_micbias(component, event,
433 struct snd_soc_component *component = priv->component;
439 snd_soc_component_update_bits(component, CDC_A_MICB_1_INT_RBIAS,
443 snd_soc_component_update_bits(component, CDC_A_MICB_2_EN,
447 snd_soc_component_update_bits(component, CDC_A_MBHC_FSM_CTL,
451 snd_soc_component_update_bits(component, CDC_A_MBHC_FSM_CTL,
468 snd_soc_component_update_bits(component, reg_addr,
479 struct snd_soc_component *component = wcd->component;
484 snd_soc_component_write(component, CDC_A_MBHC_DET_CTL_1,
496 snd_soc_component_write(component, CDC_A_MBHC_DET_CTL_2,
503 snd_soc_component_write(component, CDC_A_MBHC_DBNC_TIMER,
508 snd_soc_component_update_bits(component, CDC_D_CDC_DIG_CLK_CTL,
512 if (snd_soc_component_read(component, CDC_A_MICB_2_EN) & CDC_A_MICB_2_EN_ENABLE)
521 snd_soc_component_update_bits(component, CDC_D_INT_EN_CLR, int_en_mask, 0);
522 snd_soc_component_update_bits(component, CDC_D_INT_EN_SET, int_en_mask, int_en_mask);
532 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
533 struct pm8916_wcd_analog_priv *wcd = snd_soc_component_get_drvdata(component);
537 snd_soc_component_update_bits(component, CDC_A_MICB_2_EN,
555 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
567 snd_soc_component_update_bits(component, CDC_A_MICB_1_CTL,
576 snd_soc_component_update_bits(component, adc_reg, 1 << init_bit_shift,
580 snd_soc_component_update_bits(component, CDC_D_CDC_CONN_TX1_CTL,
586 snd_soc_component_update_bits(component, CDC_D_CDC_CONN_TX2_CTL,
598 snd_soc_component_update_bits(component, adc_reg, 1 << init_bit_shift, 0x00);
603 snd_soc_component_update_bits(component, CDC_D_CDC_CONN_TX1_CTL,
608 snd_soc_component_update_bits(component, CDC_A_MICB_1_CTL,
612 snd_soc_component_update_bits(component, CDC_D_CDC_CONN_TX2_CTL,
628 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
632 snd_soc_component_update_bits(component, CDC_A_SPKR_PWRSTG_CTL,
642 snd_soc_component_update_bits(component, CDC_A_RX_EAR_CTL,
647 snd_soc_component_update_bits(component, CDC_A_SPKR_DRV_CTL,
650 snd_soc_component_update_bits(component, w->reg,
655 snd_soc_component_update_bits(component, CDC_A_SPKR_PWRSTG_CTL,
661 snd_soc_component_update_bits(component, CDC_A_SPKR_DAC_CTL,
664 snd_soc_component_update_bits(component, CDC_A_RX_EAR_CTL,
675 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm);
679 snd_soc_component_update_bits(component, CDC_A_RX_EAR_CTL,
683 snd_soc_component_update_bits(component, CDC_A_RX_EAR_CTL,
688 snd_soc_component_update_bits(component, CDC_A_RX_EAR_CTL,
692 snd_soc_component_update_bits(component, CDC_A_RX_EAR_CTL,
718 static int pm8916_wcd_analog_probe(struct snd_soc_component *component)
720 struct pm8916_wcd_analog_priv *priv = dev_get_drvdata(component->dev);
725 dev_err(component->dev, "failed to enable regulators (%d)\n", err);
729 snd_soc_component_init_regmap(component,
730 dev_get_regmap(component->dev->parent, NULL));
731 snd_soc_component_set_drvdata(component, priv);
732 priv->pmic_rev = snd_soc_component_read(component, CDC_D_REVISION1);
733 priv->codec_version = snd_soc_component_read(component, CDC_D_PERPH_SUBTYPE);
735 dev_info(component->dev, "PMIC REV: %d\t CODEC Version: %d\n",
738 snd_soc_component_write(component, CDC_D_PERPH_RESET_CTL4, 0x01);
739 snd_soc_component_write(component, CDC_A_PERPH_RESET_CTL4, 0x01);
742 snd_soc_component_write(component, wcd_reg_defaults_2_0[reg].reg,
745 priv->component = component;
747 snd_soc_component_update_bits(component, CDC_D_CDC_RST_CTL,
756 static void pm8916_wcd_analog_remove(struct snd_soc_component *component)
758 struct pm8916_wcd_analog_priv *priv = dev_get_drvdata(component->dev);
760 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) &