From 2928e35e48296db3c9bca2630357f7c08056ecda Mon Sep 17 00:00:00 2001 From: Sergey Larin Date: Sun, 10 Feb 2019 16:55:18 +0300 Subject: [PATCH] ARM: dts: tegra20-glide: Add HALL GPIO binding This is used for keyboard slide detection. Signed-off-by: Sergey Larin --- 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 = ; debounce-interval = <10>; }; + + hall { + label = "Keyboard slide"; + gpios = <&gpio TEGRA_GPIO(W, 3) GPIO_ACTIVE_LOW>; + linux,input-type = ; + linux,code = ; + }; }; spi@7000d800 { -- 2.22.0