diff options
Diffstat (limited to 'drivers/input/keyboard')
-rw-r--r-- | drivers/input/keyboard/Kconfig | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/pxa27x_keypad.c | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index 0f84f2346fe4..f7e79b481349 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig | |||
@@ -71,7 +71,7 @@ config KEYBOARD_ATKBD | |||
71 | default y | 71 | default y |
72 | select SERIO | 72 | select SERIO |
73 | select SERIO_LIBPS2 | 73 | select SERIO_LIBPS2 |
74 | select SERIO_I8042 if X86 | 74 | select SERIO_I8042 if ARCH_MIGHT_HAVE_PC_SERIO |
75 | select SERIO_GSCPS2 if GSC | 75 | select SERIO_GSCPS2 if GSC |
76 | help | 76 | help |
77 | Say Y here if you want to use a standard AT or PS/2 keyboard. Usually | 77 | Say Y here if you want to use a standard AT or PS/2 keyboard. Usually |
diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c index d8241ba0afa0..a15063bea700 100644 --- a/drivers/input/keyboard/pxa27x_keypad.c +++ b/drivers/input/keyboard/pxa27x_keypad.c | |||
@@ -111,6 +111,8 @@ struct pxa27x_keypad { | |||
111 | unsigned short keycodes[MAX_KEYPAD_KEYS]; | 111 | unsigned short keycodes[MAX_KEYPAD_KEYS]; |
112 | int rotary_rel_code[2]; | 112 | int rotary_rel_code[2]; |
113 | 113 | ||
114 | unsigned int row_shift; | ||
115 | |||
114 | /* state row bits of each column scan */ | 116 | /* state row bits of each column scan */ |
115 | uint32_t matrix_key_state[MAX_MATRIX_KEY_COLS]; | 117 | uint32_t matrix_key_state[MAX_MATRIX_KEY_COLS]; |
116 | uint32_t direct_key_state; | 118 | uint32_t direct_key_state; |
@@ -467,7 +469,8 @@ scan: | |||
467 | if ((bits_changed & (1 << row)) == 0) | 469 | if ((bits_changed & (1 << row)) == 0) |
468 | continue; | 470 | continue; |
469 | 471 | ||
470 | code = MATRIX_SCAN_CODE(row, col, MATRIX_ROW_SHIFT); | 472 | code = MATRIX_SCAN_CODE(row, col, keypad->row_shift); |
473 | |||
471 | input_event(input_dev, EV_MSC, MSC_SCAN, code); | 474 | input_event(input_dev, EV_MSC, MSC_SCAN, code); |
472 | input_report_key(input_dev, keypad->keycodes[code], | 475 | input_report_key(input_dev, keypad->keycodes[code], |
473 | new_state[col] & (1 << row)); | 476 | new_state[col] & (1 << row)); |
@@ -802,6 +805,8 @@ static int pxa27x_keypad_probe(struct platform_device *pdev) | |||
802 | goto failed_put_clk; | 805 | goto failed_put_clk; |
803 | } | 806 | } |
804 | 807 | ||
808 | keypad->row_shift = get_count_order(pdata->matrix_key_cols); | ||
809 | |||
805 | if ((pdata->enable_rotary0 && keypad->rotary_rel_code[0] != -1) || | 810 | if ((pdata->enable_rotary0 && keypad->rotary_rel_code[0] != -1) || |
806 | (pdata->enable_rotary1 && keypad->rotary_rel_code[1] != -1)) { | 811 | (pdata->enable_rotary1 && keypad->rotary_rel_code[1] != -1)) { |
807 | input_dev->evbit[0] |= BIT_MASK(EV_REL); | 812 | input_dev->evbit[0] |= BIT_MASK(EV_REL); |