mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
matrix_keypad: Increase the max limit of rows and columns
Some keyboard controller have support for more than 16 columns and rows. Change-Id: I3fd207bfcb21648e1e6601c20588907a6c45270e Signed-off-by: Trilok Soni <tsoni@codeaurora.org> (cherry picked from commit 1fcc71dd2431913af3a5baab5d2e25ffc318a5ad) Conflicts: include/linux/input/matrix_keypad.h
This commit is contained in:
parent
71a224e616
commit
0906d07116
1 changed files with 5 additions and 5 deletions
|
@ -5,12 +5,12 @@
|
|||
#include <linux/input.h>
|
||||
#include <linux/of.h>
|
||||
|
||||
#define MATRIX_MAX_ROWS 32
|
||||
#define MATRIX_MAX_COLS 32
|
||||
#define MATRIX_MAX_ROWS 18
|
||||
#define MATRIX_MAX_COLS 18
|
||||
|
||||
#define KEY(row, col, val) ((((row) & (MATRIX_MAX_ROWS - 1)) << 24) |\
|
||||
(((col) & (MATRIX_MAX_COLS - 1)) << 16) |\
|
||||
((val) & 0xffff))
|
||||
#define KEY(row, col, val) ((((row) % (MATRIX_MAX_ROWS)) << 24) |\
|
||||
(((col) % (MATRIX_MAX_COLS)) << 16) |\
|
||||
(val & 0xffff))
|
||||
|
||||
#define KEY_ROW(k) (((k) >> 24) & 0xff)
|
||||
#define KEY_COL(k) (((k) >> 16) & 0xff)
|
||||
|
|
Loading…
Reference in a new issue