Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dylan Reid <dgreid@chromium.org>
To: alsa-devel@alsa-project.org
Cc: lars@metafoo.de, zhengxing@rock-chips.com, tiwai@suse.de,
	lgirdwood@gmail.com, broonie@kernel.org,
	Dylan Reid <dgreid@chromium.org>
Subject: [RFC 5/5] ARM: tegra: nyan: specify gpio-audio-jack device
Date: Fri, 22 May 2015 15:09:23 -0700	[thread overview]
Message-ID: <1432332563-15447-6-git-send-email-dgreid@chromium.org> (raw)
In-Reply-To: <1432332563-15447-1-git-send-email-dgreid@chromium.org>

Model the audio jack as a headset jack using the new gpio-audio-jack
device.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
---
 arch/arm/boot/dts/tegra124-nyan.dtsi | 22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

diff --git a/arch/arm/boot/dts/tegra124-nyan.dtsi b/arch/arm/boot/dts/tegra124-nyan.dtsi
index a9aec23..ec33110 100644
--- a/arch/arm/boot/dts/tegra124-nyan.dtsi
+++ b/arch/arm/boot/dts/tegra124-nyan.dtsi
@@ -1,4 +1,5 @@
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/sound/audio-jack-events.h>
 #include "tegra124.dtsi"
 
 / {
@@ -661,6 +662,23 @@
 		};
 	};
 
+	audio_jack: gpio-audio-jack {
+		compatible = "gpio-audio-jack";
+		gpio-audio-jack,jack-name = "Headset Jack";
+		gpio-audio-jack,sw-det-gpios =
+				<&gpio TEGRA_GPIO(I, 7) GPIO_ACTIVE_HIGH>,
+				<&gpio TEGRA_GPIO(R, 7) GPIO_ACTIVE_LOW>;
+		gpio-audio-jack,gpio-names =
+				"Headphones",
+				"Mic Jack";
+		gpio-audio-jack,report-masks =
+				<JACK_HEADPHONE>,
+				<JACK_MICROPHONE>;
+		gpio-audio-jack,debounce-times =
+				<150>,
+				<150>;
+	};
+
 	sound {
 		nvidia,audio-routing =
 			"Headphones", "HPR",
@@ -674,15 +692,13 @@
 
 		nvidia,i2s-controller = <&tegra_i2s1>;
 		nvidia,audio-codec = <&acodec>;
+		nvidia,headset-dev = <&audio_jack>;
 
 		clocks = <&tegra_car TEGRA124_CLK_PLL_A>,
 			 <&tegra_car TEGRA124_CLK_PLL_A_OUT0>,
 			 <&tegra_car TEGRA124_CLK_EXTERN1>;
 		clock-names = "pll_a", "pll_a_out0", "mclk";
 
-		nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(I, 7) GPIO_ACTIVE_HIGH>;
-		nvidia,mic-det-gpios =
-				<&gpio TEGRA_GPIO(R, 7) GPIO_ACTIVE_HIGH>;
 	};
 
 	gpio-restart {
-- 
2.2.1.62.g3f15098

  parent reply	other threads:[~2015-05-22 22:10 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22 22:09 [RFC 0/5] Add a gpio jack device Dylan Reid
2015-05-22 22:09 ` [RFC 1/5] ALSA: Add jack types to dt-bindings Dylan Reid
2015-05-25 12:11   ` Mark Brown
2015-05-22 22:09 ` [RFC 2/5] ASoC: jack - add_gpiods accepts filled descriptors Dylan Reid
2015-05-25 12:12   ` Mark Brown
2015-05-22 22:09 ` [RFC 3/5] ASoC: Add GPIO based jack device Dylan Reid
2015-05-25 12:11   ` Mark Brown
2015-05-26  6:20     ` Dylan Reid
2015-05-22 22:09 ` [RFC 4/5] ASoC: tegra_max98090: Change nyan to use gpio-jack Dylan Reid
2015-05-22 22:09 ` Dylan Reid [this message]
2015-05-25 15:17 ` [RFC 0/5] Add a gpio jack device Lars-Peter Clausen
2015-05-25 17:15   ` Mark Brown
2015-05-25 18:58     ` Dylan Reid
2015-05-26 18:43     ` Lars-Peter Clausen
2015-05-26 20:14       ` Mark Brown
2015-05-27  4:22         ` Dylan Reid
2015-05-27 11:15           ` Lars-Peter Clausen
2015-05-27 17:26           ` Mark Brown
2015-05-28  5:38             ` Dylan Reid
2015-05-28 10:17               ` Mark Brown
2015-05-27 11:12         ` Lars-Peter Clausen
2015-05-28 19:35           ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1432332563-15447-6-git-send-email-dgreid@chromium.org \
    --to=dgreid@chromium.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=tiwai@suse.de \
    --cc=zhengxing@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox