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

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

Merge "ASoC: msm8x16-wcd: Read subsystem name from dtsi"

parents f550d60e 089ebed2
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -756,7 +756,12 @@ normally open.

Optional Properties:
- qcom,us-euro-gpios : GPIO on which gnd/mic swap signal is coming.

- qcom,subsys-name: This value provides the subsystem name where codec
		is present. This property enables the codec driver to
		register and receive subsytem restart notification from subsystem
		and follow appropriate steps to ensure codec is in proper state
		after subsytem restart. By default codec driver register
		with ADSP subsystem.
Example:

	sound {
@@ -1649,6 +1654,12 @@ capacitor mode.
- qcom,msm-micbias2-ext-cap : Boolean. Enable micbias2 external
capacitor mode.
- qcom,msm-spk-ext-pa : GPIO which enables external speaker pa.
- qcom,subsys-name: This value provides the subsystem name where codec
		is present. This property enables the codec driver to
		register and receive subsytem restart notification from subsystem
		and follow appropriate steps to ensure codec is in proper state
		after subsytem restart. By default codec driver register
		with ADSP subsystem.

To Configure External Audio Switch
- qcom,msm-ext-audio-switch : GPIO which controls external switch that switches
+14 −3
Original line number Diff line number Diff line
@@ -5759,6 +5759,7 @@ static int msm8x16_wcd_codec_probe(struct snd_soc_codec *codec)
	struct msm8x16_wcd *msm8x16_wcd;
	struct msm8x16_wcd_pdata *pdata;
	int i, ret;
	const char *subsys_name = NULL;

	dev_dbg(codec->dev, "%s()\n", __func__);

@@ -5888,9 +5889,19 @@ static int msm8x16_wcd_codec_probe(struct snd_soc_codec *codec)
	/* Set initial cap mode */
	msm8x16_wcd_configure_cap(codec, false, false);
	registered_codec = codec;
	ret = of_property_read_string(codec->dev->of_node,
				"qcom,subsys-name",
				&subsys_name);
	if (ret) {
		dev_dbg(codec->dev, "missing subsys-name entry in dt node\n");
		adsp_state_notifier =
			subsys_notif_register_notifier("adsp",
			&adsp_state_notifier_block);
	} else {
		adsp_state_notifier =
			subsys_notif_register_notifier(subsys_name,
			&adsp_state_notifier_block);
	}
	if (!adsp_state_notifier) {
		dev_err(codec->dev, "Failed to register adsp state notifier\n");
		iounmap(msm8x16_wcd->dig_base);