ARM: dts: omap3-gta04: map antenna detect GPIO to SW_LINEIN_INSERT key event
authorH. Nikolaus Schaller <hns@goldelico.com>
Tue, 31 Jul 2018 07:11:19 +0000 (09:11 +0200)
committerTony Lindgren <tony@atomide.com>
Fri, 7 Sep 2018 17:10:56 +0000 (10:10 -0700)
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 <hns@goldelico.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/boot/dts/omap3-gta04.dtsi

index 98f31f1..28e041e 100644 (file)
                };
        };
 
+       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";