From patchwork Wed Nov 10 12:47:56 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trilok Soni X-Patchwork-Id: 314072 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAACnFTU012213 for ; Wed, 10 Nov 2010 12:49:16 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755871Ab0KJMs3 (ORCPT ); Wed, 10 Nov 2010 07:48:29 -0500 Received: from wolverine01.qualcomm.com ([199.106.114.254]:12579 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754391Ab0KJMs0 (ORCPT ); Wed, 10 Nov 2010 07:48:26 -0500 X-IronPort-AV: E=McAfee;i="5400,1158,6162"; a="61428808" Received: from pdmz-ns-mip.qualcomm.com (HELO mostmsg01.qualcomm.com) ([199.106.114.10]) by wolverine01.qualcomm.com with ESMTP/TLS/ADH-AES256-SHA; 10 Nov 2010 04:48:26 -0800 Received: from localhost.localdomain (pdmz-snip-v218.qualcomm.com [192.168.218.1]) by mostmsg01.qualcomm.com (Postfix) with ESMTPA id ADC9710004DF; Wed, 10 Nov 2010 04:48:17 -0800 (PST) From: Trilok Soni To: linux-kernel@vger.kernel.org Cc: linux-input@vger.kernel.org, rtc-linux@googlegroups.com, linux-arm-msm@vger.kernel.org, Trilok Soni , Dmitry Torokhov , Eric Miao Subject: [RFC v1 PATCH 1/6] matrix_keypad: Increase the max limit of rows and columns Date: Wed, 10 Nov 2010 18:17:56 +0530 Message-Id: <1289393281-4459-2-git-send-email-tsoni@codeaurora.org> X-Mailer: git-send-email 1.7.0.2 In-Reply-To: <1289393281-4459-1-git-send-email-tsoni@codeaurora.org> References: <1289393281-4459-1-git-send-email-tsoni@codeaurora.org> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 10 Nov 2010 12:49:17 +0000 (UTC) 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 #include -#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)