aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSesahgiri.Holi <seshagiri.holi@stericsson.com>2011-11-17 11:23:57 +0530
committerJohan YDSTROM <johan.xj.ydstrom@stericsson.com>2011-11-21 07:57:54 +0100
commit0ceafa3e14a8c2da4a4c2cc51f556a1cb181ba88 (patch)
tree0d9f77b50a0fba2624403ab1a8dc5f85fd5ef693
parentef0b1a06e5e6aa3dd07afbf3f7e1ef9c4c42ac5c (diff)
U5500: Correct key matrix logic
ST-Ericsson ID: 398141 ST-Ericsson FOSS-OUT ID: NA Signed-off-by: Sesahgiri.Holi <seshagiri.holi@stericsson.com> Change-Id: I0c0c23a6806add158ecf58e1e7f58f204208a636 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/38519 Reviewed-by: Naveen Kumar GADDIPATI <naveen.gaddipati@stericsson.com> Reviewed-by: QATOOLS Reviewed-by: QABUILD Reviewed-by: Johan YDSTROM <johan.xj.ydstrom@stericsson.com>
-rw-r--r--drivers/input/u5500_keypad.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/input/u5500_keypad.c b/drivers/input/u5500_keypad.c
index 12375a215..4983105c7 100644
--- a/drivers/input/u5500_keypad.c
+++ b/drivers/input/u5500_keypad.c
@@ -66,7 +66,7 @@ static u16 key_code[KEYPAD_MAX_ROWS * KEYPAD_MAX_COLS] = {
/*C*/ 0, 0, 0, 0, KEY_CAMERA, 0 , 0, 0, KEY_END,
/*O*/ 0, 0, 0, 0, KEY_CAMERA_FOCUS, 0 , 0, 0, KEY_VOLUMEUP,
/*L*/ 0, 0, 0, 0, KEY_MENU, KEY_SEND, 0, 0, KEY_VOLUMEDOWN,
-/*L*/ 0, 0, 0, KEY_BACK, KEY_HOME, 0, 0, 0,
+/*L*/ 0, 0, 0, 0, KEY_BACK, KEY_HOME, 0, 0, 0,
/*U*/ 0, 0, 0, 0, 0, 0, 0, 0, 0,
/*M*/ 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
@@ -84,7 +84,7 @@ static void keypad_report(int row, u8 curr, u8 previous)
u8 col = generic_ffs(changed) - 1;
u8 press = curr & BIT_MASK(col);
printf("ROW X COL = %d X %d pressed = %d - key_code= %d\n",
- row, col, press, GET_INDEX_ROW_COL(row, col));
+ row, col, press, key_code[GET_INDEX_ROW_COL(row, col)]);
if (press)
pressed_key |= key_code[GET_INDEX_ROW_COL(row, col)];
else
@@ -170,6 +170,7 @@ void init_keypad(void)
int fun_handler_cam2_back(void)
{
+ printf("Soft reset !!!!! \n");
set_to_peripheral_boot_mode();
do_reset(NULL, 0, 0, NULL);
return 1;
@@ -224,6 +225,8 @@ int wait_for_keypress(ulong msec)
pressed_key = 0;/* Reset KEY press */
ulong usec = msec * 1000;/* milli sec to micro sec */
+ /* scan for key at one first */
+ keypad_scan();
/* set bit 1 in KEYPAD_IRQ_EN register to enable IRQ */
writel(0x01, KEYPAD_IRQ_EN);
/* For delays mor than 10 sec we need loop for every chunks of 10 sec */