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