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: 70628 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-px0-f184.google.com (mail-px0-f184.google.com [209.85.212.184]) by ozlabs.org (Postfix) with ESMTP id A0639B70EA for ; Wed, 10 Nov 2010 23:48:28 +1100 (EST) Received: by pxi3 with SMTP id 3sf233636pxi.11 for ; Wed, 10 Nov 2010 04:48:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:mime-version:x-beenthere:received :received:received:received:received-spf:x-ironport-av:received :received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-original-sender:x-original-authentication-results :reply-to:precedence:mailing-list:list-id:list-post:list-help :list-archive:sender:list-subscribe:list-unsubscribe:content-type; bh=odrKzYVdGbPN/vAsH8q341gXEwPMlRhloceZQEZGGDk=; b=u5jZPetgaCCvnZoUwBRt3lRibW8+6Ca9yux2ActbMuDJHbHkL+VNOwfSRMsmckPx2L HgHB1W7HdTJUFgX/PVO3NmNK6fBddPYfvfq7cmSfSM2FnO2PyRoQkwlMjAKLpW0rVO+/ Jam2gfa7lYMWvlwFArRA0yxHdviibTKGi5hN0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=mime-version:x-beenthere:received-spf:x-ironport-av:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :sender:list-subscribe:list-unsubscribe:content-type; b=yeAqyMyhRy4j+jdoLgGFslEVSgUqqZKU1faOr+VTg22HeCBcfbsU5EN9P7dF6ZtkU6 OpXnJ+s3XJpr+vmIinqz5WOBPgKagcDXUdAMpdkdAfN49pxBhLtmxLo+bMvsqTKct1xa H9TSvOnPfuhEJ2gX7iwPys8DBZ16ugxFGb/Gw= Received: by 10.142.149.20 with SMTP id w20mr500087wfd.52.1289393307056; Wed, 10 Nov 2010 04:48:27 -0800 (PST) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.142.249.41 with SMTP id w41ls1050851wfh.1.p; Wed, 10 Nov 2010 04:48:26 -0800 (PST) Received: by 10.142.44.16 with SMTP id r16mr5665700wfr.47.1289393306805; Wed, 10 Nov 2010 04:48:26 -0800 (PST) Received: by 10.142.44.16 with SMTP id r16mr5665699wfr.47.1289393306773; Wed, 10 Nov 2010 04:48:26 -0800 (PST) Received: from wolverine01.qualcomm.com (wolverine01.qualcomm.com [199.106.114.254]) by gmr-mx.google.com with ESMTP id n6si1224988wfl.7.2010.11.10.04.48.26; Wed, 10 Nov 2010 04:48:26 -0800 (PST) Received-SPF: neutral (google.com: 199.106.114.254 is neither permitted nor denied by best guess record for domain of tsoni@codeaurora.org) client-ip=199.106.114.254; 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: [rtc-linux] [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> X-Original-Sender: tsoni@codeaurora.org X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 199.106.114.254 is neither permitted nor denied by best guess record for domain of tsoni@codeaurora.org) smtp.mail=tsoni@codeaurora.org Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: List-Post: , List-Help: , List-Archive: Sender: rtc-linux@googlegroups.com List-Subscribe: , List-Unsubscribe: , Some keyboard controller have support for more than 16 columns and rows. Cc: Dmitry Torokhov Cc: Eric Miao Signed-off-by: Trilok Soni --- 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 #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)