From patchwork Tue Feb 23 08:01:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anand Moon X-Patchwork-Id: 8388491 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 41BE4C0553 for ; Tue, 23 Feb 2016 08:03:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 67A872066E for ; Tue, 23 Feb 2016 08:03:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9148D20662 for ; Tue, 23 Feb 2016 08:03:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1aY7ux-0005pb-2O; Tue, 23 Feb 2016 08:01:59 +0000 Received: from mail-pf0-x231.google.com ([2607:f8b0:400e:c00::231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aY7ut-0005Rn-Jh for linux-arm-kernel@lists.infradead.org; Tue, 23 Feb 2016 08:01:56 +0000 Received: by mail-pf0-x231.google.com with SMTP id x65so108033071pfb.1 for ; Tue, 23 Feb 2016 00:01:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=RrDKF3gOYmbeNgK/UAUKgopdXRSC+rq0yNwxSh5VdoI=; b=VFv76Tu/GQ49Y4OeusRZjB3wU4T21nJzKMKvKAGkqK2KPBcwe/0SouqH1Tml/Vsz4I j+y3RorDTqyuM16mHISrpsskWE67E6ygPrEDgN0gL3j8W0GIFqlr9rgEo1i3lsSguOqC 0tiq4z+5UdIpxT3OzKNnU/9PcoOIoboXzCPdapGJX0InaQoMxwdVN0cmwGtrEdJf6vTC ccKMAlVKwUY/057prGy9uTc1hZSBygyw5Viuf+3klG38qq/AeTExWWwU9KYVhDOStj84 L/Uo5duYKsTdjLiZ5CTjArWnLeXJM9ztBo6FSZa24HMcg25Nptme9AqQWHm2lFIR5S7M bq6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=RrDKF3gOYmbeNgK/UAUKgopdXRSC+rq0yNwxSh5VdoI=; b=QIw9ygKD5c9e6+ZFj6eoSZIxCJye6bwdfkjSBPXPN/DA6MccqQh/15zVVWcJy+jv15 LS0C86KArHc6vqgUF8+zL1SbQO9oKXYtVLKiLa4yPWn/NLGbMi6zJ4/HvYIQSj1kjpr+ kEPxR6/VoDxBlzNLXAGqi8H2f7NvElwznM3h+aQ7gVtBa38pkSBxyzjhMtrmf9k+KWuC 6fkhpPJY/bwtSctaGFR7au8M7L7GyiIN9RX253jIUNFEwRvC1psXE7l7ytoz/ex8kdVC nJ2SK4WJtWqXx4IiaADT4iLFdiD3ihGqFTV2m3ZPf5Kb3LmDjfrf9JbuFHZcuRMWTFrg 5IKw== X-Gm-Message-State: AG10YOQue+2LLy6ksn9rr7jCruYGnscpb9bdPH8yv6Ru6HcQllN7y1mTAm9/V9X99JXgjQ== X-Received: by 10.98.0.148 with SMTP id 142mr44219109pfa.84.1456214494199; Tue, 23 Feb 2016 00:01:34 -0800 (PST) Received: from localhost.localdomain ([115.112.130.129]) by smtp.gmail.com with ESMTPSA id n68sm41901344pfj.46.2016.02.23.00.01.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Feb 2016 00:01:33 -0800 (PST) From: Anand Moon To: Kukjin Kim , Krzysztof Kozlowski , Javier Martinez Canillas , Marek Szyprowski , Anand Moon Subject: [PATCH] ARM: dts: add support for gpio buttons for exynos5422-odroidxu3 Date: Tue, 23 Feb 2016 08:01:07 +0000 Message-Id: <1456214467-3344-1-git-send-email-linux.amoon@gmail.com> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160223_000155_744384_58D299E5 X-CRM114-Status: GOOD ( 14.16 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add support for gpio-based button on Odroid-XU3 boards for reboot/poweroff feature. Signed-off-by: Anand Moon --- 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 +#include #include #include #include @@ -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 = ; + 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>;