Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba3473e0 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "asoc: sdm660_cdc: Add L10 and L1 to on-demand supply list"

parents 70cc96d8 6c4de733
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
@@ -87,6 +87,9 @@ static bool spkr_boost_en = true;

static char on_demand_supply_name[][MAX_ON_DEMAND_SUPPLY_NAME_LENGTH] = {
	"cdc-vdd-mic-bias",
	"",
	"cdc-vdda18-l10",
	"cdc-vdd-l1",
};

static struct wcd_mbhc_register
@@ -3448,6 +3451,16 @@ static const struct snd_soc_dapm_widget msm_anlg_cdc_dapm_widgets[] = {
		msm_anlg_cdc_codec_enable_on_demand_supply,
		SND_SOC_DAPM_PRE_PMU |
		SND_SOC_DAPM_POST_PMD),
	SND_SOC_DAPM_SUPPLY("VDDA18_L10_REGULATOR", SND_SOC_NOPM,
		ON_DEMAND_VDDA18_L10, 0,
		msm_anlg_cdc_codec_enable_on_demand_supply,
		SND_SOC_DAPM_PRE_PMU |
		SND_SOC_DAPM_POST_PMD),
	SND_SOC_DAPM_SUPPLY("VDD_L1_REGULATOR", SND_SOC_NOPM,
		ON_DEMAND_VDD_L1, 0,
		msm_anlg_cdc_codec_enable_on_demand_supply,
		SND_SOC_DAPM_PRE_PMU |
		SND_SOC_DAPM_POST_PMD),

	SND_SOC_DAPM_MICBIAS_E("MIC BIAS Internal1",
		MSM89XX_PMIC_ANALOG_MICB_1_EN, 7, 0,
@@ -4137,6 +4150,20 @@ static int msm_anlg_cdc_soc_probe(struct snd_soc_codec *codec)
	atomic_set(&sdm660_cdc->on_demand_list[ON_DEMAND_MICBIAS].ref,
		   0);

	msm_anlg_cdc_update_micbias_regulator(
				sdm660_cdc,
				on_demand_supply_name[ON_DEMAND_VDD_L1],
				&sdm660_cdc->on_demand_list[ON_DEMAND_VDD_L1]);
	atomic_set(&sdm660_cdc->on_demand_list[ON_DEMAND_VDD_L1].ref,
		   0);

	msm_anlg_cdc_update_micbias_regulator(
			sdm660_cdc,
			on_demand_supply_name[ON_DEMAND_VDDA18_L10],
			&sdm660_cdc->on_demand_list[ON_DEMAND_VDDA18_L10]);
	atomic_set(&sdm660_cdc->on_demand_list[ON_DEMAND_VDDA18_L10].ref,
		   0);

	sdm660_cdc->fw_data = devm_kzalloc(codec->dev,
					sizeof(*(sdm660_cdc->fw_data)),
					GFP_KERNEL);
@@ -4183,6 +4210,13 @@ static int msm_anlg_cdc_soc_remove(struct snd_soc_codec *codec)
	sdm660_cdc_priv->on_demand_list[ON_DEMAND_MICBIAS].supply = NULL;
	atomic_set(&sdm660_cdc_priv->on_demand_list[ON_DEMAND_MICBIAS].ref,
		   0);
	sdm660_cdc_priv->on_demand_list[ON_DEMAND_VDD_L1].supply = NULL;
	atomic_set(&sdm660_cdc_priv->on_demand_list[ON_DEMAND_VDD_L1].ref,
		   0);
	sdm660_cdc_priv->on_demand_list[ON_DEMAND_VDDA18_L10].supply = NULL;
	atomic_set(&sdm660_cdc_priv->on_demand_list[ON_DEMAND_VDDA18_L10].ref,
		   0);

	wcd_mbhc_deinit(&sdm660_cdc_priv->mbhc);

	return 0;
+2 −0
Original line number Diff line number Diff line
@@ -121,6 +121,8 @@ enum {
enum {
	ON_DEMAND_MICBIAS = 0,
	ON_DEMAND_SPKDRV,
	ON_DEMAND_VDDA18_L10,
	ON_DEMAND_VDD_L1,
	ON_DEMAND_SUPPLIES_MAX,
};