aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-w90x900
diff options
context:
space:
mode:
authorwanzongshun <mcuos.com@gmail.com>2010-07-18 10:17:04 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-07-22 04:20:17 -0400
commit9e3aaac335e93d2f35d41e51b569becd2a43c260 (patch)
tree0375b2d030dd43d712350a7cf60835c213f97b70 /arch/arm/mach-w90x900
parent6a446b906d58420f9282d74d42e28ff7e3b50b5c (diff)
ARM: 6232/1: add nuc900 keypad arch platform data
This patch is to add nuc900 keypad arch platform data. Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-w90x900')
-rw-r--r--arch/arm/mach-w90x900/dev.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/arm/mach-w90x900/dev.c b/arch/arm/mach-w90x900/dev.c
index 73b3ecaf81c1..7ae543899c85 100644
--- a/arch/arm/mach-w90x900/dev.c
+++ b/arch/arm/mach-w90x900/dev.c
@@ -37,6 +37,7 @@
37#include <mach/map.h> 37#include <mach/map.h>
38#include <mach/fb.h> 38#include <mach/fb.h>
39#include <mach/regs-ldm.h> 39#include <mach/regs-ldm.h>
40#include <mach/w90p910_keypad.h>
40 41
41#include "cpu.h" 42#include "cpu.h"
42 43
@@ -362,6 +363,39 @@ struct platform_device nuc900_device_fmi = {
362 363
363/* KPI controller*/ 364/* KPI controller*/
364 365
366static int nuc900_keymap[] = {
367 KEY(0, 0, KEY_A),
368 KEY(0, 1, KEY_B),
369 KEY(0, 2, KEY_C),
370 KEY(0, 3, KEY_D),
371
372 KEY(1, 0, KEY_E),
373 KEY(1, 1, KEY_F),
374 KEY(1, 2, KEY_G),
375 KEY(1, 3, KEY_H),
376
377 KEY(2, 0, KEY_I),
378 KEY(2, 1, KEY_J),
379 KEY(2, 2, KEY_K),
380 KEY(2, 3, KEY_L),
381
382 KEY(3, 0, KEY_M),
383 KEY(3, 1, KEY_N),
384 KEY(3, 2, KEY_O),
385 KEY(3, 3, KEY_P),
386};
387
388static struct matrix_keymap_data nuc900_map_data = {
389 .keymap = nuc900_keymap,
390 .keymap_size = ARRAY_SIZE(nuc900_keymap),
391};
392
393struct w90p910_keypad_platform_data nuc900_keypad_info = {
394 .keymap_data = &nuc900_map_data,
395 .prescale = 0xfa,
396 .debounce = 0x50,
397};
398
365static struct resource nuc900_kpi_resource[] = { 399static struct resource nuc900_kpi_resource[] = {
366 [0] = { 400 [0] = {
367 .start = W90X900_PA_KPI, 401 .start = W90X900_PA_KPI,
@@ -381,6 +415,9 @@ struct platform_device nuc900_device_kpi = {
381 .id = -1, 415 .id = -1,
382 .num_resources = ARRAY_SIZE(nuc900_kpi_resource), 416 .num_resources = ARRAY_SIZE(nuc900_kpi_resource),
383 .resource = nuc900_kpi_resource, 417 .resource = nuc900_kpi_resource,
418 .dev = {
419 .platform_data = &nuc900_keypad_info,
420 }
384}; 421};
385 422
386/* LCD controller*/ 423/* LCD controller*/