* [PATCH] Fix pxa27x keypad KPC macros
@ 2008-02-19 10:25 Samuel Ortiz
2008-03-20 7:02 ` eric miao
[not found] ` <E913911567467945BBEB9277E27868B088127A@msiexch01.marvell.com>
0 siblings, 2 replies; 3+ messages in thread
From: Samuel Ortiz @ 2008-02-19 10:25 UTC (permalink / raw)
To: linux-input, dmitry.torokhov; +Cc: Eric Miao
Hi Dmitry,
On the pxa27x keypad driver, we want to mask (key_number - 1), not
key_number.
The current implementation works fine for all values but the maximum
one, i.e. 8.
This patch is against your input git tree.
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
---
drivers/input/keyboard/pxa27x_keypad.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: linux-2.6-input/drivers/input/keyboard/pxa27x_keypad.c
===================================================================
--- linux-2.6-input.orig/drivers/input/keyboard/pxa27x_keypad.c 2008-02-19 11:10:04.000000000 +0100
+++ linux-2.6-input/drivers/input/keyboard/pxa27x_keypad.c 2008-02-19 11:11:00.000000000 +0100
@@ -50,9 +50,9 @@
#define KPKDI 0x0048
/* bit definitions */
-#define KPC_MKRN(n) ((((n) & 0x7) - 1) << 26) /* matrix key row number */
-#define KPC_MKCN(n) ((((n) & 0x7) - 1) << 23) /* matrix key column number */
-#define KPC_DKN(n) ((((n) & 0x7) - 1) << 6) /* direct key number */
+#define KPC_MKRN(n) ((((n) - 1) & 0x7) << 26) /* matrix key row number */
+#define KPC_MKCN(n) ((((n) - 1) & 0x7) << 23) /* matrix key column number */
+#define KPC_DKN(n) ((((n) - 1) & 0x7) << 6) /* direct key number */
#define KPC_AS (0x1 << 30) /* Automatic Scan bit */
#define KPC_ASACT (0x1 << 29) /* Automatic Scan on Activity */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix pxa27x keypad KPC macros
2008-02-19 10:25 [PATCH] Fix pxa27x keypad KPC macros Samuel Ortiz
@ 2008-03-20 7:02 ` eric miao
[not found] ` <E913911567467945BBEB9277E27868B088127A@msiexch01.marvell.com>
1 sibling, 0 replies; 3+ messages in thread
From: eric miao @ 2008-03-20 7:02 UTC (permalink / raw)
To: Samuel Ortiz; +Cc: linux-input, dmitry.torokhov, Eric Miao
Yes, indeed. Sorry I'm replying this late as I just come across.
On Tue, Feb 19, 2008 at 6:25 PM, Samuel Ortiz <sameo@openedhand.com> wrote:
> Hi Dmitry,
>
> On the pxa27x keypad driver, we want to mask (key_number - 1), not
> key_number.
> The current implementation works fine for all values but the maximum
> one, i.e. 8.
>
> This patch is against your input git tree.
>
> Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
> ---
> drivers/input/keyboard/pxa27x_keypad.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> Index: linux-2.6-input/drivers/input/keyboard/pxa27x_keypad.c
> ===================================================================
> --- linux-2.6-input.orig/drivers/input/keyboard/pxa27x_keypad.c 2008-02-19 11:10:04.000000000 +0100
> +++ linux-2.6-input/drivers/input/keyboard/pxa27x_keypad.c 2008-02-19 11:11:00.000000000 +0100
> @@ -50,9 +50,9 @@
> #define KPKDI 0x0048
>
> /* bit definitions */
> -#define KPC_MKRN(n) ((((n) & 0x7) - 1) << 26) /* matrix key row number */
> -#define KPC_MKCN(n) ((((n) & 0x7) - 1) << 23) /* matrix key column number */
> -#define KPC_DKN(n) ((((n) & 0x7) - 1) << 6) /* direct key number */
> +#define KPC_MKRN(n) ((((n) - 1) & 0x7) << 26) /* matrix key row number */
> +#define KPC_MKCN(n) ((((n) - 1) & 0x7) << 23) /* matrix key column number */
> +#define KPC_DKN(n) ((((n) - 1) & 0x7) << 6) /* direct key number */
>
> #define KPC_AS (0x1 << 30) /* Automatic Scan bit */
> #define KPC_ASACT (0x1 << 29) /* Automatic Scan on Activity */
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
Cheers
- eric
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix pxa27x keypad KPC macros
[not found] ` <E913911567467945BBEB9277E27868B088127A@msiexch01.marvell.com>
@ 2008-03-20 13:49 ` Dmitry Torokhov
0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2008-03-20 13:49 UTC (permalink / raw)
To: Eric Miao; +Cc: Samuel Ortiz, linux-input
Hi,
On Tue, Feb 19, 2008 at 04:27:46PM -0800, Eric Miao wrote:
> Yeah, looks fine.
>
> Acked-by: eric miao <eric.miao@marvell.com>
>
Applied to the for-linus branch of my tree. Thank you Samuel
and Eric.
--
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-03-20 13:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-19 10:25 [PATCH] Fix pxa27x keypad KPC macros Samuel Ortiz
2008-03-20 7:02 ` eric miao
[not found] ` <E913911567467945BBEB9277E27868B088127A@msiexch01.marvell.com>
2008-03-20 13:49 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).