[RFC v1 PATCH 1/6] matrix_keypad: Increase the max limit of rows and columns

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Trilok Soni
Date: Wednesday, November 10, 2010 - 5:47 am

Some keyboard controller have support for more than
16 columns and rows.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
---
 include/linux/input/matrix_keypad.h |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/input/matrix_keypad.h b/include/linux/input/matrix_keypad.h
index 80352ad..d80845e 100644
--- a/include/linux/input/matrix_keypad.h
+++ b/include/linux/input/matrix_keypad.h
@@ -4,11 +4,11 @@
 #include <linux/types.h>
 #include <linux/input.h>
 
-#define MATRIX_MAX_ROWS		16
-#define MATRIX_MAX_COLS		16
+#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) |\
+#define KEY(row, col, val)	((((row) % (MATRIX_MAX_ROWS)) << 24) |\
+				 (((col) % (MATRIX_MAX_COLS)) << 16) |\
 				 (val & 0xffff))
 
 #define KEY_ROW(k)		(((k) >> 24) & 0xff)
-- 
1.7.0.2

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC v1 PATCH 1/6] matrix_keypad: Increase the max limit o ..., Trilok Soni, (Wed Nov 10, 5:47 am)
Re: [RFC v1 PATCH 3/6] led: pmic8058: Add PMIC8058 leds driver, Lars-Peter Clausen, (Wed Nov 10, 1:45 pm)
Re: [RFC v1 PATCH 3/6] led: pmic8058: Add PMIC8058 leds driver, Lars-Peter Clausen, (Wed Nov 10, 4:50 pm)
Re: [RFC v1 PATCH 6/6] drivers: rtc: Add support for Qualc ..., Lars-Peter Clausen, (Fri Nov 12, 5:53 am)
RE: [RFC v1 PATCH 5/6] input: pmic8058-othc: Add support f ..., Datta, Shubhrajyoti, (Mon Nov 15, 10:36 pm)