From patchwork Mon Jan 10 13:26:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Enric Balletbo Serra X-Patchwork-Id: 468901 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p0ADQUiG007995 for ; Mon, 10 Jan 2011 13:26:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753965Ab1AJN0b (ORCPT ); Mon, 10 Jan 2011 08:26:31 -0500 Received: from mail-ww0-f44.google.com ([74.125.82.44]:46222 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753883Ab1AJN0b (ORCPT ); Mon, 10 Jan 2011 08:26:31 -0500 Received: by wwa36 with SMTP id 36so651111wwa.1 for ; Mon, 10 Jan 2011 05:26:29 -0800 (PST) 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=2yl1SVEz8j5BQUPp2nhWESeeMb4caaEBPFCJbzApqUk=; b=MQrtt1HsWMQvi0idc3pFvtiUB8WsYMdrELLj2AP7eXb7A4U9uPwPQrgQsnpRGSzXIk Vx/h/WaDZZPlfqMRQln4KwM8b6K9icK2GylhTDJ+tW5GiIgzcuchoNI9M3Y1cU8EsRzo GIxgu+DJbvdnv4GTvu1oK1h8muWeTJVZfglXA= 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=Kg0mySHo5v/i62BU7i5Y2LMXuHNYweM/ETbAdhWQwF+SHebsB2MLmoCEskyRDzIl25 DAcrtAggM7kE4gcMbzqluh9r7TRRGrymQCoeS3kAE3Eepmwd02yFea81p/S4ZgyhkEQW Vg9EKw4O71za8Rd+Q0nvTP8bieiqi/G2yBLfQ= Received: by 10.227.183.71 with SMTP id cf7mr4995237wbb.195.1294665989728; Mon, 10 Jan 2011 05:26:29 -0800 (PST) Received: from localhost.localdomain (249.Red-80-33-164.staticIP.rima-tde.net [80.33.164.249]) by mx.google.com with ESMTPS id 11sm20061666wbi.12.2011.01.10.05.26.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 10 Jan 2011 05:26:28 -0800 (PST) From: Enric Balletbo i Serra To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tony@atomide.com Cc: Enric Balletbo i Serra Subject: [PATCH 3/3] omap3: igep2: Add keypad support. Date: Mon, 10 Jan 2011 14:26:14 +0100 Message-Id: <1294665974-10590-4-git-send-email-eballetbo@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1294665974-10590-1-git-send-email-eballetbo@gmail.com> References: <1294665974-10590-1-git-send-email-eballetbo@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.6 (demeter1.kernel.org [140.211.167.41]); Mon, 10 Jan 2011 13:26:32 +0000 (UTC) diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 0afa301..3a6cce5 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -535,6 +536,37 @@ static struct twl4030_codec_data igep2_codec_data = { .audio = &igep2_audio_data, }; +static int igep2_keymap[] = { + KEY(0, 0, KEY_LEFT), + KEY(0, 1, KEY_RIGHT), + KEY(0, 2, KEY_A), + KEY(0, 3, KEY_B), + KEY(1, 0, KEY_DOWN), + KEY(1, 1, KEY_UP), + KEY(1, 2, KEY_E), + KEY(1, 3, KEY_F), + KEY(2, 0, KEY_ENTER), + KEY(2, 1, KEY_I), + KEY(2, 2, KEY_J), + KEY(2, 3, KEY_K), + KEY(3, 0, KEY_M), + KEY(3, 1, KEY_N), + KEY(3, 2, KEY_O), + KEY(3, 3, KEY_P) +}; + +static struct matrix_keymap_data igep2_keymap_data = { + .keymap = igep2_keymap, + .keymap_size = ARRAY_SIZE(igep2_keymap), +}; + +static struct twl4030_keypad_data igep2_keypad_pdata = { + .keymap_data = &igep2_keymap_data, + .rows = 4, + .cols = 4, + .rep = 1, +}; + static struct twl4030_platform_data igep2_twldata = { .irq_base = TWL4030_IRQ_BASE, .irq_end = TWL4030_IRQ_END, @@ -543,6 +575,7 @@ static struct twl4030_platform_data igep2_twldata = { .usb = &igep2_usb_data, .codec = &igep2_codec_data, .gpio = &igep2_twl4030_gpio_pdata, + .keypad = &igep2_keypad_pdata, .vmmc1 = &igep2_vmmc1, .vpll2 = &igep2_vpll2, .vio = &igep2_vio,