All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Chemparathy <cyril@ti.com>
To: linux-input@vger.kernel.org,
	davinci-linux-open-source@linux.davincidsp.com
Cc: Cyril Chemparathy <cyril@ti.com>
Subject: [PATCH 4/7] davinci: add keypad config for tnetv107x evm board
Date: Mon, 13 Sep 2010 12:29:45 -0400	[thread overview]
Message-ID: <1284395388-32687-5-git-send-email-cyril@ti.com> (raw)
In-Reply-To: <1284395388-32687-1-git-send-email-cyril@ti.com>

This patch adds evm board specific keymap definitions and controller
configuration data for on-chip keypad controller on tnetv107x silicon.

Signed-off-by: Cyril Chemparathy <cyril@ti.com>
---
 arch/arm/mach-davinci/board-tnetv107x-evm.c |   42 +++++++++++++++++++++++++++
 1 files changed, 42 insertions(+), 0 deletions(-)

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 <linux/delay.h>
 #include <linux/platform_device.h>
 #include <linux/ratelimit.h>
+#include <linux/input.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 #include <asm/mach/arch.h>
@@ -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)
-- 
1.7.0.4


  parent reply	other threads:[~2010-09-13 16:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13 16:29 [PATCH 0/7] add tnetv107x input drivers Cyril Chemparathy
2010-09-13 16:29 ` [PATCH 1/7] davinci: define tnetv107x keypad platform data Cyril Chemparathy
2010-09-14  1:26   ` Dmitry Torokhov
2010-09-13 16:29 ` [PATCH 2/7] input: add driver for tnetv107x on-chip keypad controller Cyril Chemparathy
2010-09-14  1:26   ` Dmitry Torokhov
2010-09-13 16:29 ` [PATCH 3/7] davinci: add tnetv107x keypad platform device Cyril Chemparathy
2010-09-13 16:29 ` Cyril Chemparathy [this message]
2010-09-13 16:29 ` [PATCH 5/7] input: add driver for tnetv107x touchscreen controller Cyril Chemparathy
2010-09-14  1:27   ` Dmitry Torokhov
2010-09-14  6:38   ` Datta, Shubhrajyoti
2010-09-13 16:29 ` [PATCH 6/7] davinci: add tnetv107x touchscreen platform device Cyril Chemparathy
2010-09-13 16:29 ` [PATCH 7/7] davinci: add touchscreen config for tnetv107x evm board Cyril Chemparathy
2010-09-16 17:53 ` [PATCH 0/7] add tnetv107x input drivers Kevin Hilman
2010-09-16 18:11   ` Dmitry Torokhov
2010-09-16 18:29     ` Kevin Hilman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1284395388-32687-5-git-send-email-cyril@ti.com \
    --to=cyril@ti.com \
    --cc=davinci-linux-open-source@linux.davincidsp.com \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.