Thread (36 messages) 36 messages, 2 authors, 2018-09-07
STALE2849d
Revisions (2)
  1. v1 [diff vs current]
  2. v2 current

[PATCH v2 16/32] ARM: dts: omap3-gta04: map antenna detect GPIO to SW_LINEIN_INSERT key event

From: H. Nikolaus Schaller <hidden>
Date: 2018-07-31 07:11:54
Also in: linux-omap, lkml
Subsystem: the rest · Maintainer: Linus Torvalds

GTA04 can detect presence/absence or plug-in of an external
GPS antenna through a gpio. The best match for an event code
is SW_LINEIN_INSERT.

Signed-off-by: H. Nikolaus Schaller <redacted>
---
 arch/arm/boot/dts/omap3-gta04.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
index 98f31f1814d0..28e041ec4e98 100644
--- a/arch/arm/boot/dts/omap3-gta04.dtsi
+++ b/arch/arm/boot/dts/omap3-gta04.dtsi
@@ -50,6 +50,21 @@
 		};
 	};
 
+	antenna-detect {
+		compatible = "gpio-keys";
+
+		gps_antenna_button: gps-antenna-button {
+			label = "GPS_EXT_ANT";
+			linux,input-type = <EV_SW>;
+			linux,code = <SW_LINEIN_INSERT>;
+			gpios = <&gpio5 16 GPIO_ACTIVE_HIGH>; /* GPIO144 */
+			interrupt-parent = <&gpio5>;
+			interrupts = <16 IRQ_TYPE_EDGE_BOTH>;
+			debounce-interval = <10>;
+			wakeup-source;
+		};
+	};
+
 	sound {
 		compatible = "ti,omap-twl4030";
 		ti,model = "gta04";
-- 
2.12.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help