From patchwork Thu Jul 1 19:58:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Grazvydas Ignotas X-Patchwork-Id: 109372 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o61JwbaY001991 for ; Thu, 1 Jul 2010 19:58:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757906Ab0GAT6f (ORCPT ); Thu, 1 Jul 2010 15:58:35 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:57949 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755630Ab0GAT6e (ORCPT ); Thu, 1 Jul 2010 15:58:34 -0400 Received: by wwb24 with SMTP id 24so215057wwb.1 for ; Thu, 01 Jul 2010 12:58:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=8Uja7dFq9v33fbWHuqeBYQqnDiXRQ4gtW7XFwKosEWM=; b=O2nxW+jK9V/bYWYCY+KrXZD7U9xMdTiEjXWClOKd0NDZJw6qvfdxfyXZkUyvRS4ng2 BXTERJ6sdNok04yKx86DMuLz3kLD08mIKtbaUAb0Q3nfP716v+1q+gY3iHpI2zVI18D/ W4oJcNPf5PzmwvJU2x8gUcuRaukbl24j2THEY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=xdV0mah6xDeXHuEun+oe+CrHmdrhPYMOyvG8Z3o1C83mD4wMJlIJNE1HIwz4wsKNlr JBxtAkgAXJ3wvx8X0Yl0urzXGCNe353nok518fOsTUQzg4KPPPb0+f9I2foV6iOHovwW Lcnf8CP7+ltESuWkipfTxvDEg8Lsl8Hwt++lM= Received: by 10.213.48.148 with SMTP id r20mr2837164ebf.30.1278014312841; Thu, 01 Jul 2010 12:58:32 -0700 (PDT) Received: from localhost.localdomain (ip-88-119-226-136.static.b4net.lt [88.119.226.136]) by mx.google.com with ESMTPS id b49sm13053435eei.23.2010.07.01.12.58.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 01 Jul 2010 12:58:32 -0700 (PDT) From: Grazvydas Ignotas To: linux-omap@vger.kernel.org Cc: Tony Lindgren , Grazvydas Ignotas Subject: [PATCH 1/2] omap3: pandora: update gpio-keys data Date: Thu, 1 Jul 2010 22:58:20 +0300 Message-Id: <1278014301-24645-2-git-send-email-notasas@gmail.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1278014301-24645-1-git-send-email-notasas@gmail.com> References: <1278014301-24645-1-git-send-email-notasas@gmail.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 01 Jul 2010 19:58:37 +0000 (UTC) diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index ebbfb49..6131d98 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c @@ -49,9 +49,6 @@ #define OMAP3_PANDORA_TS_GPIO 94 -/* hardware debounce: (value + 1) * 31us */ -#define GPIO_DEBOUNCE_TIME 127 - static struct gpio_led pandora_gpio_leds[] = { { .name = "pandora::sd1", @@ -89,6 +86,7 @@ static struct platform_device pandora_leds_gpio = { .type = ev_type, \ .code = ev_code, \ .active_low = act_low, \ + .debounce_interval = 4, \ .desc = "btn " descr, \ } @@ -100,14 +98,14 @@ static struct gpio_keys_button pandora_gpio_keys[] = { GPIO_BUTTON_LOW(103, KEY_DOWN, "down"), GPIO_BUTTON_LOW(96, KEY_LEFT, "left"), GPIO_BUTTON_LOW(98, KEY_RIGHT, "right"), - GPIO_BUTTON_LOW(109, KEY_KP1, "game 1"), - GPIO_BUTTON_LOW(111, KEY_KP2, "game 2"), - GPIO_BUTTON_LOW(106, KEY_KP3, "game 3"), - GPIO_BUTTON_LOW(101, KEY_KP4, "game 4"), - GPIO_BUTTON_LOW(102, BTN_TL, "l"), - GPIO_BUTTON_LOW(97, BTN_TL2, "l2"), - GPIO_BUTTON_LOW(105, BTN_TR, "r"), - GPIO_BUTTON_LOW(107, BTN_TR2, "r2"), + GPIO_BUTTON_LOW(109, KEY_PAGEUP, "game 1"), + GPIO_BUTTON_LOW(111, KEY_END, "game 2"), + GPIO_BUTTON_LOW(106, KEY_PAGEDOWN, "game 3"), + GPIO_BUTTON_LOW(101, KEY_HOME, "game 4"), + GPIO_BUTTON_LOW(102, KEY_RIGHTSHIFT, "l"), + GPIO_BUTTON_LOW(97, KEY_KPPLUS, "l2"), + GPIO_BUTTON_LOW(105, KEY_RIGHTCTRL, "r"), + GPIO_BUTTON_LOW(107, KEY_KPMINUS, "r2"), GPIO_BUTTON_LOW(104, KEY_LEFTCTRL, "ctrl"), GPIO_BUTTON_LOW(99, KEY_MENU, "menu"), GPIO_BUTTON_LOW(176, KEY_COFFEE, "hold"), @@ -128,14 +126,7 @@ static struct platform_device pandora_keys_gpio = { }, }; -static void __init pandora_keys_gpio_init(void) -{ - /* set debounce time for GPIO banks 4 and 6 */ - gpio_set_debounce(32 * 3, GPIO_DEBOUNCE_TIME); - gpio_set_debounce(32 * 5, GPIO_DEBOUNCE_TIME); -} - -static int board_keymap[] = { +static const uint32_t board_keymap[] = { /* row, col, code */ KEY(0, 0, KEY_9), KEY(0, 1, KEY_8), @@ -598,7 +589,6 @@ static void __init omap3pandora_init(void) ARRAY_SIZE(omap3pandora_spi_board_info)); omap3pandora_ads7846_init(); usb_ehci_init(&ehci_pdata); - pandora_keys_gpio_init(); usb_musb_init(&musb_board_data); /* Ensure SDRC pins are mux'd for self-refresh */