]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ARM: dts: Add lid GPIO key device node for Peach boards
authorJavier Martinez Canillas <javier.martinez@collabora.co.uk>
Wed, 14 Jan 2015 15:30:40 +0000 (00:30 +0900)
committerKukjin Kim <kgene@kernel.org>
Wed, 14 Jan 2015 15:30:40 +0000 (00:30 +0900)
The Exynos5420 Peach Pit and Exynos5800 Peach Pi boards have both
a power and lid GPIO keys but only the former was defined in the
DTS. Add DTS snippets for the lid GPIO key too. These were taken
from the downstream ChromeOS 3.8 kernel tree.

Signed-off-by: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
arch/arm/boot/dts/exynos5420-peach-pit.dts
arch/arm/boot/dts/exynos5800-peach-pi.dts

index 9a050e19a4dcd5b9a0f4db2ba29e689ab3d9ed9c..fa74a731d7202cd9c2efa158f030fd10af184b5d 100644 (file)
@@ -53,7 +53,7 @@
                compatible = "gpio-keys";
 
                pinctrl-names = "default";
-               pinctrl-0 = <&power_key_irq>;
+               pinctrl-0 = <&power_key_irq &lid_irq>;
 
                power {
                        label = "Power";
                        linux,code = <KEY_POWER>;
                        gpio-key,wakeup;
                };
+
+               lid-switch {
+                       label = "Lid";
+                       gpios = <&gpx3 4 GPIO_ACTIVE_LOW>;
+                       linux,input-type = <5>; /* EV_SW */
+                       linux,code = <0>; /* SW_LID */
+                       debounce-interval = <1>;
+                       gpio-key,wakeup;
+               };
        };
 
        memory {
                samsung,pin-drv = <0>;
        };
 
+       lid_irq: lid-irq {
+               samsung,pins = "gpx3-4";
+               samsung,pin-function = <0xf>;
+               samsung,pin-pud = <0>;
+               samsung,pin-drv = <0>;
+       };
+
        hdmi_hpd_irq: hdmi-hpd-irq {
                samsung,pins = "gpx3-7";
                samsung,pin-function = <0>;
index e8fdda827fc9d5561d6097ded1b177644442e31a..d603e733ad130ef079de40a23b82f142224cce36 100644 (file)
@@ -52,7 +52,7 @@
                compatible = "gpio-keys";
 
                pinctrl-names = "default";
-               pinctrl-0 = <&power_key_irq>;
+               pinctrl-0 = <&power_key_irq &lid_irq>;
 
                power {
                        label = "Power";
                        linux,code = <KEY_POWER>;
                        gpio-key,wakeup;
                };
+
+               lid-switch {
+                       label = "Lid";
+                       gpios = <&gpx3 4 GPIO_ACTIVE_LOW>;
+                       linux,input-type = <5>; /* EV_SW */
+                       linux,code = <0>; /* SW_LID */
+                       debounce-interval = <1>;
+                       gpio-key,wakeup;
+               };
+
        };
 
        memory {
                samsung,pin-drv = <0>;
        };
 
+       lid_irq: lid-irq {
+               samsung,pins = "gpx3-4";
+               samsung,pin-function = <0xf>;
+               samsung,pin-pud = <0>;
+               samsung,pin-drv = <0>;
+       };
+
        hdmi_hpd_irq: hdmi-hpd-irq {
                samsung,pins = "gpx3-7";
                samsung,pin-function = <0>;