From patchwork Sun Aug 5 20:39:12 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Arnaud Patard (Rtp)" X-Patchwork-Id: 1275721 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 51E60DF27F for ; Sun, 5 Aug 2012 20:47:17 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Sy7gI-0002dc-3z; Sun, 05 Aug 2012 20:44:10 +0000 Received: from [2a01:e0b:1:135:62eb:69ff:fe08:4532] (helo=lebrac.rtp-net.org) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Sy7g7-0002cD-9d for linux-arm-kernel@lists.infradead.org; Sun, 05 Aug 2012 20:44:00 +0000 Received: by lebrac.rtp-net.org (Postfix, from userid 1000) id 66E3329252; Sun, 5 Aug 2012 22:43:42 +0200 (CEST) Message-Id: <20120805203920.804712126@rtp-net.org> User-Agent: quilt/0.60-1 Date: Sun, 05 Aug 2012 22:39:12 +0200 From: Arnaud Patard (Rtp) To: linux-arm-kernel@lists.infradead.org Subject: [patch 1/2] ARM: Kirkwood: Describe iconnect keys in DT. Content-Disposition: inline; filename=iconnect-gpio-keys.patch X-Spam-Note: CRM114 invocation failed X-Spam-Score: -1.1 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.8 RDNS_NONE Delivered to internal network by a host with no rDNS Cc: Andrew Lunn , Jason Cooper X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Define the 2 keys found on iconnect in DT. It's also changing the keycodes/ switches to use better ones. Signed-off-by: Arnaud Patard Index: alunn/arch/arm/boot/dts/kirkwood-iconnect.dts =================================================================== --- alunn.orig/arch/arm/boot/dts/kirkwood-iconnect.dts 2012-07-25 23:46:51.039862074 +0200 +++ alunn/arch/arm/boot/dts/kirkwood-iconnect.dts 2012-07-25 23:58:06.487832357 +0200 @@ -69,4 +69,22 @@ gpios = <&gpio1 16 0>; }; }; + + gpio_keys { + compatible = "gpio-keys"; + #address-cells = <1>; + #size-cells = <0>; + button@1 { + label = "OTB Button"; + linux,code = <133>; + gpios = <&gpio1 3 1>; + debounce-interval = <100>; + }; + button@2 { + label = "Reset"; + linux,code = <0x198>; + gpios = <&gpio0 12 1>; + debounce-interval = <100>; + }; + }; }; Index: alunn/arch/arm/mach-kirkwood/board-iconnect.c =================================================================== --- alunn.orig/arch/arm/mach-kirkwood/board-iconnect.c 2012-07-25 23:46:38.911862608 +0200 +++ alunn/arch/arm/mach-kirkwood/board-iconnect.c 2012-07-25 23:58:06.487832357 +0200 @@ -19,8 +19,6 @@ #include #include #include -#include -#include #include #include #include "common.h" @@ -52,40 +50,6 @@ static struct mtd_partition iconnect_nan }, }; -/* yikes... theses are the original input buttons */ -/* but I'm not convinced by the sw event choices */ -static struct gpio_keys_button iconnect_buttons[] = { - { - .type = EV_SW, - .code = SW_LID, - .gpio = 12, - .desc = "Reset Button", - .active_low = 1, - .debounce_interval = 100, - }, { - .type = EV_SW, - .code = SW_TABLET_MODE, - .gpio = 35, - .desc = "OTB Button", - .active_low = 1, - .debounce_interval = 100, - }, -}; - -static struct gpio_keys_platform_data iconnect_button_data = { - .buttons = iconnect_buttons, - .nbuttons = ARRAY_SIZE(iconnect_buttons), -}; - -static struct platform_device iconnect_button_device = { - .name = "gpio-keys", - .id = -1, - .num_resources = 0, - .dev = { - .platform_data = &iconnect_button_data, - }, -}; - void __init iconnect_init(void) { kirkwood_mpp_conf(iconnect_mpp_config); @@ -93,8 +57,6 @@ void __init iconnect_init(void) kirkwood_ehci_init(); kirkwood_ge00_init(&iconnect_ge00_data); - - platform_device_register(&iconnect_button_device); } static int __init iconnect_pci_init(void)