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

Commit 4f07aa16 authored by Surendar Karka's avatar Surendar Karka
Browse files

ARM: dts: msm: add support for gpio based jack detection on qcs605



Add gpio based detection support for linein and
lineout jack types.

Change-Id: Ic854ad3065aeb176ccab0144f343f4e716738ef7
Signed-off-by: default avatarSurendar Karka <skarka@codeaurora.org>
parent ec9d62e9
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -1643,6 +1643,16 @@ mclk frequency needs to be configured for internal and external PA.
		threshold values for different codecs. First parameter is V(voltage)
		second one is i(current), third one is r (resistance). Depending on the
		codec set corresponding element in array and set others to 0.
- qcom,msm-linein-det-swh: This property is used to distinguish linein jack
	switch type on target typically the switch type will be normally open or
	normally close, value for this property 0 for normally close and 1 for
	normally open.
- qcom,msm-lineout-det-swh: This property is used to distinguish lineout jack
	switch type on target typically the switch type will be normally open or
	normally close, value for this property 0 for normally close and 1 for
	normally open.
- qcom,linein-det-gpio : GPIO on which linein jack insertion/removal interrupt is received.
- qcom,lineout-det-gpio : GPIO on which lineout jack insertion/removal interrupt is received.

Example:
	 sound {
@@ -1703,6 +1713,10 @@ Example:
				<&wsa881x_213>, <&wsa881x_214>;
		qcom,wsa-aux-dev-prefix = "SpkrRight", "SpkrLeft",
					  "SpkrRight", "SpkrLeft";
		qcom,linein-det-swh = <1>;
		qcom,lineout-det-swh = <1>;
		qcom,linein-det-gpio = <&tlmm 124 0>;
		qcom,lineout-det-gpio = <&tlmm 125 0>;
	};

* MSM8952 Slimbus ASoC Machine driver
+7 −0
Original line number Diff line number Diff line
@@ -206,6 +206,13 @@
	qcom,wsa-max-devs = <1>;
	qcom,wsa-devs = <&wsa881x_0211>, <&wsa881x_0213>;
	qcom,wsa-aux-dev-prefix = "SpkrLeft", "SpkrLeft";
	qcom,linein-det-swh = <1>;
	qcom,lineout-det-swh = <1>;
	qcom,linein-det-gpio = <&tlmm 124 0>;
	qcom,lineout-det-gpio = <&tlmm 125 0>;
	pinctrl-names = "default";
	pinctrl-0 = <&jack_det_linein_default
		     &jack_det_lineout_default>;
};

&soc {
+30 −0
Original line number Diff line number Diff line
@@ -1732,6 +1732,36 @@
			};
		};

		gpio_jack_det_line_in {
			jack_det_linein_default: jack_det_linein_default {
				mux {
					pins = "gpio124";
					function = "gpio";
				};

				config {
					pins = "gpio124";
					bias-pull-up; /* pull up */
					input-enable;
				};
			};
		};

		gpio_jack_det_line_out {
			jack_det_lineout_default: jack_det_lineout_default {
				mux {
					pins = "gpio125";
					function = "gpio";
				};

				config {
					pins = "gpio125";
					bias-pull-up; /* pull up */
					input-enable;
				};
			};
		};

		flash_led3_front {
			flash_led3_front_en: flash_led3_front_en {
				mux {