From patchwork Mon Sep 13 16:29:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Chemparathy X-Patchwork-Id: 174942 Received: from comal.ext.ti.com (comal.ext.ti.com [198.47.26.152]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8DGWjtx016994 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 13 Sep 2010 16:33:05 GMT Received: from dlep36.itg.ti.com ([157.170.170.91]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id o8DGV95X030083 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 13 Sep 2010 11:31:09 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id o8DGV9lX013417; Mon, 13 Sep 2010 11:31:09 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id 216C980793; Mon, 13 Sep 2010 11:30:38 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dlep36.itg.ti.com (dlep36.itg.ti.com [157.170.170.91]) by linux.omap.com (Postfix) with ESMTP id 5C41B80627 for ; Mon, 13 Sep 2010 11:29:52 -0500 (CDT) Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id o8DGTpZi011948; Mon, 13 Sep 2010 11:29:51 -0500 (CDT) Received: from gtrgwdeb (gtrgwdeb.telogy.design.ti.com [158.218.102.24]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id o8DGTpf14096; Mon, 13 Sep 2010 11:29:51 -0500 (CDT) Received: by gtrgwdeb (Postfix, from userid 39959) id 047D51E790C; Mon, 13 Sep 2010 12:29:50 -0400 (EDT) From: Cyril Chemparathy To: linux-input@vger.kernel.org, davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH 4/7] davinci: add keypad config for tnetv107x evm board Date: Mon, 13 Sep 2010 12:29:45 -0400 Message-Id: <1284395388-32687-5-git-send-email-cyril@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1284395388-32687-1-git-send-email-cyril@ti.com> References: <1284395388-32687-1-git-send-email-cyril@ti.com> X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: davinci-linux-open-source-bounces@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 13 Sep 2010 16:33:06 +0000 (UTC) diff --git a/arch/arm/mach-davinci/board-tnetv107x-evm.c b/arch/arm/mach-davinci/board-tnetv107x-evm.c index fe2a9d9..2fe7a3f 100644 --- a/arch/arm/mach-davinci/board-tnetv107x-evm.c +++ b/arch/arm/mach-davinci/board-tnetv107x-evm.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -141,10 +142,51 @@ static struct davinci_uart_config serial_config __initconst = { .enabled_uarts = BIT(1), }; +static int keymap[] = { + /* row 0 */ + KEY_NUMERIC_1, KEY_NUMERIC_2, KEY_NUMERIC_3, KEY_FN_F1, KEY_MENU, + /* row 1 */ + KEY_NUMERIC_4, KEY_NUMERIC_5, KEY_NUMERIC_6, KEY_UP, KEY_FN_F2, + /* row 2 */ + KEY_NUMERIC_7, KEY_NUMERIC_8, KEY_NUMERIC_9, KEY_LEFT, KEY_ENTER, + /* row 3 */ + KEY_NUMERIC_STAR, KEY_NUMERIC_0, KEY_NUMERIC_POUND, KEY_DOWN, KEY_RIGHT, + /* row 4 */ + KEY_FN_F3, KEY_FN_F4, KEY_MUTE, KEY_HOME, KEY_BACK, + /* row 5 */ + KEY_VOLUMEDOWN, KEY_VOLUMEUP, KEY_F1, KEY_F2, KEY_F3, +}; + +static const char *keynames[] = { + /* row 0 */ + "1", "2", "3", "S1 (FN_F1)", "MENU", + /* row 1 */ + "4", "5", "6", "UP", "S2 (FN_F2)", + /* row 2 */ + "7", "8", "9", "LEFT", "ENTER", + /* row 3 */ + "*", "0", "#", "DOWN", "RIGHT", + /* row 4 */ + "SPEAKER (FN_F3)", "HEADSET (FN_F4)", "MUTE", "HOME", "BACK", + /* row 5 */ + "VOL_DOWN", "VOL_UP", "F1", "F2", "F3", +}; + +static struct tnetv107x_keypad_data keypad_config = { + .keynames = keynames, + .keymap = keymap, + .keymap_size = ARRAY_SIZE(keymap), + .rows = 6, + .cols = 5, + .debounce = 0x400, + .stable = 0x3, +}; + static struct tnetv107x_device_info evm_device_info __initconst = { .serial_config = &serial_config, .mmc_config[1] = &mmc_config, /* controller 1 */ .nand_config[0] = &nand_config, /* chip select 0 */ + .keypad_config = &keypad_config, }; static __init void tnetv107x_evm_board_init(void)