From patchwork Fri May 31 22:45:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 2646141 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) by patchwork2.kernel.org (Postfix) with ESMTP id 0A4BFDFB79 for ; Fri, 31 May 2013 22:48:43 +0000 (UTC) Received: from merlin.infradead.org ([205.233.59.134]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UiY6W-0005rP-O2; Fri, 31 May 2013 22:47:25 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1UiY67-0004te-4V; Fri, 31 May 2013 22:46:59 +0000 Received: from mail-pd0-f175.google.com ([209.85.192.175]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1UiY5b-0004qY-VH for linux-arm-kernel@lists.infradead.org; Fri, 31 May 2013 22:46:29 +0000 Received: by mail-pd0-f175.google.com with SMTP id 4so915672pdd.20 for ; Fri, 31 May 2013 15:46:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=tFJ4R5LD78Ditpva+mypcjA/fe2SuQNQY5x6izPNca8=; b=jIh6sITYMGNAp5NYb6Di8UjMR0VG9DQ76Q3D8g7paXk1g5gM7pBYqM80BXYW2DDK4c NkbI4+63Wpifq3TBDaTiAXHYQBmVVvzfg2ajilz2nV/Gyng/Y/RfBK2Zt48d6pQ4b4WK tui0JrYTTrBKRit0p6zM36yLrUpVlUyBLI3FDbtHLPuhRf5SkacUvdhwyZ6wHZRX1jmK QticcxsB9f4abC5bWnjtBJtp30BDTo6a71VMUOBEYsBDL6gzecEuES0Aa414BcLaU1Yl rI3T17CXNciuwSNiqFRR5G07zfy5a+HvWWz4XSN1mJ3nB87WJGdAtD5aNbwT+kWaT/sM RBMQ== X-Received: by 10.68.164.33 with SMTP id yn1mr14995271pbb.71.1370040365579; Fri, 31 May 2013 15:46:05 -0700 (PDT) Received: from localhost (c-24-19-7-36.hsd1.wa.comcast.net. [24.19.7.36]) by mx.google.com with ESMTPSA id sg4sm48403930pbc.7.2013.05.31.15.46.03 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 31 May 2013 15:46:04 -0700 (PDT) From: Kevin Hilman To: Benoit Cousson , linux-omap@vger.kernel.org Subject: [PATCH 2/3] ARM: DTS: OMAP3: beagle: enable user button via gpio_keys, enable wakeup Date: Fri, 31 May 2013 15:45:56 -0700 Message-Id: <1370040357-25794-3-git-send-email-khilman@linaro.org> X-Mailer: git-send-email 1.8.2 In-Reply-To: <1370040357-25794-1-git-send-email-khilman@linaro.org> References: <1370040357-25794-1-git-send-email-khilman@linaro.org> X-Gm-Message-State: ALoCoQkbU+HUhtzvDNxiHNabSjcc5hVgXvsdGiL6oG5/0j6yXP/0WtjE0On4zweEdGpKIm7ozT2v X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130531_184628_092911_A86A8581 X-CRM114-Status: GOOD ( 10.16 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [209.85.192.175 listed in list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Using the gpio-keys bindings, configure the user button on Beagle boards. Since the user button is enabled as a wakeup source, also ensure the GPIO pin is mux'd correctly and has IO ring wakeups enabled, so it can also wakeup from off mode. Signed-off-by: Kevin Hilman --- arch/arm/boot/dts/omap3-beagle-xm.dts | 25 +++++++++++++++++++++++++ arch/arm/boot/dts/omap3-beagle.dts | 25 +++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts index ca067b0..c93c36f 100644 --- a/arch/arm/boot/dts/omap3-beagle-xm.dts +++ b/arch/arm/boot/dts/omap3-beagle-xm.dts @@ -57,6 +57,26 @@ ti,mcbsp = <&mcbsp2>; ti,codec = <&twl_audio>; }; + + gpio_keys { + compatible = "gpio-keys"; + + user { + label = "user"; + gpios = <&gpio1 4 0>; + linux,code = <0x114>; + gpio-key,wakeup; + }; + + }; +}; + +&omap3_pmx_wkup { + gpio1_pins: pinmux_gpio1_pins { + pinctrl-single,pins = < + 0x0e 0x4104 /* sys_boot2.gpio_4 WAKEUP | INPUT | MODE4 */ + >; + }; }; &i2c1 { @@ -140,3 +160,8 @@ pinctrl-names = "default"; pinctrl-0 = <&uart3_pins>; }; + +&gpio1 { + pinctrl-names = "default"; + pinctrl-0 = <&gpio1_pins>; +}; diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts index b004372..c9794cb 100644 --- a/arch/arm/boot/dts/omap3-beagle.dts +++ b/arch/arm/boot/dts/omap3-beagle.dts @@ -71,6 +71,26 @@ reset-supply = <&hsusb2_reset>; vcc-supply = <&hsusb2_power>; }; + + gpio_keys { + compatible = "gpio-keys"; + + user { + label = "user"; + gpios = <&gpio1 7 0>; + linux,code = <0x114>; + gpio-key,wakeup; + }; + + }; +}; + +&omap3_pmx_wkup { + gpio1_pins: pinmux_gpio1_pins { + pinctrl-single,pins = < + 0x14 0x4104 /* sys_boot5.gpio_7 WAKEUP | INPUT | MODE4 */ + >; + }; }; &omap3_pmx_core { @@ -154,3 +174,8 @@ pinctrl-names = "default"; pinctrl-0 = <&uart3_pins>; }; + +&gpio1 { + pinctrl-names = "default"; + pinctrl-0 = <&gpio1_pins>; +};