pmaports/device/linux-samsung-i927/0034-ARM-dts-tegra20-glide-Add-HALL-GPIO-binding.patch
Sergey Larin 6b1072a789 samsung-i927: Kernel updates (!217)
- Use separated patches
- Use new panel driver (with backlight support)
- Battery fixes
- Fix compass (AK8975) (not tested, only probing works, but sometimes
  doesn't - says "Unexpected device" - need to investigate that)
- Touchkey is working + LED
- Keyboard backlight + HALL for slideout detection
2019-02-12 23:28:56 +01:00

48 lines
1.4 KiB
Diff

From ceeecef75e5faa16a3f435eb25bb66c3d983a345 Mon Sep 17 00:00:00 2001
From: Sergey Larin <cerg2010cerg2010@mail.ru>
Date: Sun, 10 Feb 2019 16:55:18 +0300
Subject: [PATCH 34/34] ARM: dts: tegra20-glide: Add HALL GPIO binding
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