]> git.baikalelectronics.ru Git - kernel.git/commit
Input: pxa27x-keypad - fix generating scancode
authorChao Xie <chao.xie@marvell.com>
Tue, 13 May 2014 02:20:48 +0000 (19:20 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 14 May 2014 06:12:44 +0000 (23:12 -0700)
commite61963866f68c95352a7af7cb304d846abb5b3ed
tree162430f40334def173bc4c94541aa2570cc5b8c1
parent9d5cf6a0da7fb7ffc17a2ffd2236f57918020135
Input: pxa27x-keypad - fix generating scancode

The number of columns of pxa27x-keypad used by various boards is not fixed.
When building keymap with call to:

matrix_keypad_build_keymap(keymap_data, NULL,
                           pdata->matrix_key_rows,
                           pdata->matrix_key_cols,
                           keypad->keycodes, input_dev);

it will internally calculate needed row shift and use it to fill the
keymap. Therefore when calculating the "scancode" we should no longer use
constant row shift but also calculate it from number of columns.

Signed-off-by: Chao Xie <chao.xie@marvell.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/pxa27x_keypad.c