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: 2646101 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id BD5143FD4E for ; Fri, 31 May 2013 22:46:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756715Ab3EaWqI (ORCPT ); Fri, 31 May 2013 18:46:08 -0400 Received: from mail-pd0-f174.google.com ([209.85.192.174]:45246 "EHLO mail-pd0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756571Ab3EaWqG (ORCPT ); Fri, 31 May 2013 18:46:06 -0400 Received: by mail-pd0-f174.google.com with SMTP id 3so2898382pdj.33 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=YN1JK18JUBz7TwlcgL+kr6J6sCNE3/xld0+N/B9ZsCNDPHSORhUuazqCGwQL0u9Rco MrZJbwCX+MflqOUw2JQ/RRW5o3D4lxxsgzFGysC1Vy3elj4g88FUWL6c+UVJSWo9tZgq PRgi88TeesVgn0rJ+NlFKNQvQ0e6T7fZoX6wDNz8WdwPLKpxb1MBPm87+ZNJSShzenpO b8u/tZa5Pz0jNJagu+Ccyiba/TB+1/6rWBpGY8sG1hjMcisLJHFDwSRYQoq114HBJqQ4 mgGUx7i3Fx0aKIPEWEErOpzrwU/kBv70Rx8YWMKzF4B/oL3IhviUhQ9t4vhyPRnGj8RM nDLw== 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 Cc: linux-arm-kernel@lists.infradead.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: ALoCoQkbAq9LPh0p8SwOp85qBJSK1yg8r7YXHe7a9B4TS1f/3c6slNb5CzDuvETDo5gH9ExWyLXo Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.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>; +};