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

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

Merge "ASoC: msm: migrate to cdc pinctrl functions"

parents ac56f609 69898f67
Loading
Loading
Loading
Loading
+12 −17
Original line number Diff line number Diff line
@@ -361,6 +361,10 @@ Required properties:

 - compatible : "qcom,msm-cdc-pinctrl"

Optional properties:
 - qcom,lpi-gpios : This boolean property is added if GPIOs are under
		    LPI TLMM.

* msm-dai-slim

Required properties:
@@ -1655,6 +1659,10 @@ mclk frequency needs to be configured for internal and external PA.
- qcom,wsa-max-devs : Maximum number of WSA881x devices present in the target
- qcom,wsa-devs : List of phandles for all possible WSA881x devices supported for the target
- qcom,wsa-aux-dev-prefix : Name prefix with Left/Right configuration for WSA881x device
- qcom,cdc-pdm-gpios : phandle for pdm gpios.
- qcom,cdc-comp-gpios : phandle for compander gpios.
- qcom,cdc-dmic-gpios : phandle for Digital mic clk and data gpios.
- qcom,cdc-sdw-gpios : phandle for soundwire clk and data gpios.

Example:
	 sound {
@@ -1675,24 +1683,11 @@ Example:
			"AMIC1", "MIC BIAS External",
			"AMIC2", "MIC BIAS Internal2",
			"AMIC3", "MIC BIAS External";
		qcom,msm-gpios =
			"int_pdm",
			"us_eu_gpio";
		qcom,pinctrl-names =
			"all_off",
			"int_pdm_act",
			"us_eu_gpio_act",
			"int_pdm_us_eu_gpio_act";
		pinctrl-names =
			"all_off",
			"int_pdm_act",
			"us_eu_gpio_act",
			"int_pdm_us_eu_gpio_act";
		pinctrl-0 = <&cdc_pdm_lines_sus &cdc_pdm_lines_2_sus &cross_conn_det_sus>;
		pinctrl-1 = <&cdc_pdm_lines_act &cdc_pdm_lines_2_act &cross_conn_det_sus>;
		pinctrl-2 = <&cdc_pdm_lines_sus &cdc_pdm_lines_2_sus &cross_conn_det_act>;
		pinctrl-3 = <&cdc_pdm_lines_act &cdc_pdm_lines_2_act &cross_conn_det_act>;
		qcom,cdc-us-euro-gpios = <&msm_gpio 63 0>;
		qcom,cdc-pdm-gpios = <&cdc_pdm_gpios>;
		qcom,cdc-comp-gpios = <&cdc_comp_gpios>;
		qcom,cdc-dmic-gpios = <&cdc_dmic_gpios>;
		qcom,cdc-sdw-gpios = <&cdc_sdw_gpios>;
		asoc-platform = <&pcm0>, <&pcm1>, <&voip>, <&voice>,
				<&loopback>, <&compress>, <&hostless>,
				<&afe>, <&lsm>, <&routing>, <&lpa>;
+9 −7
Original line number Diff line number Diff line
@@ -180,13 +180,15 @@ static int msm_cdc_pinctrl_probe(struct platform_device *pdev)
		ret = PTR_ERR(gpio_data->pinctrl_sleep);
		goto err_lookup_state;
	}

	/* skip setting to sleep state for LPI_TLMM GPIOs */
	if (!of_property_read_bool(pdev->dev.of_node, "qcom,lpi-gpios")) {
		/* Set pinctrl state to aud_sleep by default */
		ret = pinctrl_select_state(gpio_data->pinctrl,
					   gpio_data->pinctrl_sleep);
		if (ret)
			dev_err(&pdev->dev, "%s: set cdc gpio sleep state fail: %d\n",
				__func__, ret);
	}

	gpio_data->gpio = of_get_named_gpio(pdev->dev.of_node,
					    "qcom,cdc-rst-n-gpio", 0);
+4 −3
Original line number Diff line number Diff line
@@ -232,11 +232,11 @@ static int msm_dig_cdc_codec_config_compander(struct snd_soc_codec *codec,

			/* Enable Compander GPIO */
			if (dig_cdc->codec_hph_comp_gpio)
				dig_cdc->codec_hph_comp_gpio(1);
				dig_cdc->codec_hph_comp_gpio(1, codec);
		} else if (SND_SOC_DAPM_EVENT_OFF(event)) {
			/* Disable Compander GPIO */
			if (dig_cdc->codec_hph_comp_gpio)
				dig_cdc->codec_hph_comp_gpio(0);
				dig_cdc->codec_hph_comp_gpio(0, codec);

			snd_soc_update_bits(codec,
				MSM89XX_CDC_CORE_COMP0_B2_CTL, 0x0F, 0x05);
@@ -264,7 +264,8 @@ static int msm_dig_cdc_codec_config_compander(struct snd_soc_codec *codec,
 *
 */
void msm_dig_cdc_hph_comp_cb(
	int (*codec_hph_comp_gpio)(bool enable), struct snd_soc_codec *codec)
	int (*codec_hph_comp_gpio)(bool enable, struct snd_soc_codec *codec),
	struct snd_soc_codec *codec)
{
	struct msm_dig_priv *dig_cdc = snd_soc_codec_get_drvdata(codec);

+3 −2
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ enum {
struct msm_dig_priv {
	struct snd_soc_codec *codec;
	u32 comp_enabled[MSM89XX_RX_MAX];
	int (*codec_hph_comp_gpio)(bool enable);
	int (*codec_hph_comp_gpio)(bool enable, struct snd_soc_codec *codec);
	s32 dmic_1_2_clk_cnt;
	s32 dmic_3_4_clk_cnt;
	bool dec_active[NUM_DECIMATORS];
@@ -85,7 +85,8 @@ enum {
};

extern void msm_dig_cdc_hph_comp_cb(
		int (*codec_hph_comp_gpio)(bool enable),
		int (*codec_hph_comp_gpio)(
			bool enable, struct snd_soc_codec *codec),
		struct snd_soc_codec *codec);
int msm_dig_codec_info_create_codec_entry(struct snd_info_entry *codec_root,
					  struct snd_soc_codec *codec);
+1 −0
Original line number Diff line number Diff line
@@ -119,6 +119,7 @@ config SND_SOC_INT_CODEC
	select MSM_QDSP6_PDR
	select MSM_QDSP6_NOTIFIER
	select MSM_QDSP6V2_CODECS
	select MSM_CDC_PINCTRL
	select SND_SOC_MSM_SDW
	select SND_SOC_MSMFALCON_CDC
	select QTI_PP
Loading