2019-02-09 18:46:43 +00:00
|
|
|
From ceeecef75e5faa16a3f435eb25bb66c3d983a345 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Sergey Larin <cerg2010cerg2010@mail.ru>
|
|
|
|
Date: Sun, 10 Feb 2019 16:55:18 +0300
|
2019-02-24 19:33:39 +00:00
|
|
|
Subject: [PATCH] ARM: dts: tegra20-glide: Add HALL GPIO binding
|
2019-02-09 18:46:43 +00:00
|
|
|
|
|
|
|
This is used for keyboard slide detection.
|
|
|
|
|
|
|
|
Signed-off-by: Sergey Larin <cerg2010cerg2010@mail.ru>
|
|
|
|
---
|
|
|
|
arch/arm/boot/dts/tegra20-glide.dts | 15 +++++++++++++++
|
|
|
|
1 file changed, 15 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/arch/arm/boot/dts/tegra20-glide.dts b/arch/arm/boot/dts/tegra20-glide.dts
|
|
|
|
index 3d419e094665..ab30b1b8cc29 100644
|
|
|
|
--- a/arch/arm/boot/dts/tegra20-glide.dts
|
|
|
|
+++ b/arch/arm/boot/dts/tegra20-glide.dts
|
|
|
|
@@ -1107,6 +1107,14 @@
|
|
|
|
kbd {
|
|
|
|
label = "Keyboard backlight";
|
|
|
|
gpios = <&gpio TEGRA_GPIO(L, 5) GPIO_ACTIVE_HIGH>;
|
|
|
|
+ /*
|
|
|
|
+ * Looks like there's no way to specify GPIO for trigger in DT.
|
|
|
|
+ * So keyboard hall GPIO is PW3, which number is 179.
|
|
|
|
+ * (See TEGRA_GPIO() macro)
|
|
|
|
+ * To enable this trigger:
|
|
|
|
+ * echo gpio > /sys/class/leds/Keyboard\ backlight/trigger
|
|
|
|
+ * echo 179 > /sys/class/leds/Keyboard\ backlight/gpio
|
|
|
|
+ */
|
|
|
|
linux,default-trigger = "gpio";
|
|
|
|
default-state = "off";
|
|
|
|
};
|
|
|
|
@@ -1232,6 +1240,13 @@
|
|
|
|
linux,code = <KEY_VOLUMEDOWN>;
|
|
|
|
debounce-interval = <10>;
|
|
|
|
};
|
|
|
|
+
|
|
|
|
+ hall {
|
|
|
|
+ label = "Keyboard slide";
|
|
|
|
+ gpios = <&gpio TEGRA_GPIO(W, 3) GPIO_ACTIVE_LOW>;
|
|
|
|
+ linux,input-type = <EV_SW>;
|
|
|
|
+ linux,code = <SW_KEYPAD_SLIDE>;
|
|
|
|
+ };
|
|
|
|
};
|
|
|
|
|
|
|
|
spi@7000d800 {
|
|
|
|
--
|
|
|
|
2.20.1
|
|
|
|
|