[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1456214467-3344-1-git-send-email-linux.amoon@gmail.com>
Date: Tue, 23 Feb 2016 08:01:07 +0000
From: Anand Moon <linux.amoon@...il.com>
To: Kukjin Kim <kgene@...nel.org>,
Krzysztof Kozlowski <k.kozlowski@...sung.com>,
Javier Martinez Canillas <javier@....samsung.com>,
Marek Szyprowski <m.szyprowski@...sung.com>,
Anand Moon <linux.amoon@...il.com>
Cc: devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] ARM: dts: add support for gpio buttons for exynos5422-odroidxu3
Add support for gpio-based button on Odroid-XU3 boards
for reboot/poweroff feature.
Signed-off-by: Anand Moon <linux.amoon@...il.com>
---
changes rebase based on linux next-20160222.
Tested on Odroid-XU4
dmesg output.
[ 3.286068] of_get_named_gpiod_flags: parsed 'gpios' property of node '/gpio_keys/power_key[0]' - status (0)
[ 3.286206] gpio-11 (power key): gpiod_set_debounce: missing set() or set_debounce() operations
[ 3.286600] input: gpio_keys as /devices/platform/gpio_keys/input/input0
---
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
index 1bd507b..db9770b 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
@@ -11,6 +11,7 @@
*/
#include <dt-bindings/clock/samsung,s2mps11.h>
+#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/sound/samsung-i2s.h>
@@ -54,6 +55,22 @@
#cooling-cells = <2>;
cooling-levels = <0 130 170 230>;
};
+
+ gpio_keys {
+ compatible = "gpio-keys";
+ pinctrl-names = "default";
+ pinctrl-0 = <&gpio_power_key>;
+
+ power_key {
+ interrupt-parent = <&gpx0>;
+ interrupts = <3 IRQ_TYPE_NONE>;
+ gpios = <&gpx0 3 GPIO_ACTIVE_LOW>;
+ linux,code = <KEY_POWER>;
+ label = "power key";
+ debounce-interval = <10>;
+ wakeup-source;
+ };
+ };
};
&clock_audss {
@@ -362,6 +379,11 @@
};
&pinctrl_0 {
+ gpio_power_key: power_key {
+ samsung,pins = "gpx0-3";
+ samsung,pin-pud = <0>;
+ };
+
hdmi_hpd_irq: hdmi-hpd-irq {
samsung,pins = "gpx3-7";
samsung,pin-function = <0>;
--
2.1.4
Powered by blists - more mailing lists