public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP: Fix broken omap-keypad
@ 2009-10-21 14:20 Janusz Krzysztofik
  2009-10-21 15:59 ` Tony Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: Janusz Krzysztofik @ 2009-10-21 14:20 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap@vger.kernel.org, e3-hacking

Hi,
Commit 4f5433324d1e29cf234d5b1b14782c0fc2948298 had made machines that use new 
matrix_keypad based drivers happy while breaking those that still use old
omap-keypad driver. The patch fixes omap-keypad device for my Amstrad Delta
(tested) and probably 11 more OMAP1 based machines. It leaves a potential
similiar problem on OMAP2 H4 machine not addressed.

I would say that those new, matrix_keypad based drivers should be corrected to
simply not include arch/arm/plat-omap/include/mach/keypad.h, which should keep
serving omap-keypad based machines until they are all upgraded to use 
matrix_keypad.

Created against linux-2.6.32-rc5

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>

---
--- linux-2.6.32-rc5/arch/arm/plat-omap/include/mach/keypad.h.orig	2009-10-16 02:41:50.000000000 +0200
+++ linux-2.6.32-rc5/arch/arm/plat-omap/include/mach/keypad.h	2009-10-21 15:32:37.000000000 +0200
@@ -10,7 +10,9 @@
 #ifndef ASMARM_ARCH_KEYPAD_H
 #define ASMARM_ARCH_KEYPAD_H
 
+#ifndef CONFIG_ARCH_OMAP1
 #include <linux/input/matrix_keypad.h>
+#endif
 
 struct omap_kp_platform_data {
 	int rows;
@@ -38,5 +40,11 @@ struct omap_kp_platform_data {
 #define KEY_PERSISTENT		0x00800000
 #define KEYNUM_MASK		0x00EFFFFF
 
+#ifdef CONFIG_ARCH_OMAP1
+#define KEY(col, row, val) (((col) << 28) | ((row) << 24) | (val))
+#define PERSISTENT_KEY(col, row) (((col) << 28) | ((row) << 24) | \
+						KEY_PERSISTENT)
+#endif
+
 #endif
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-10-22 18:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-21 14:20 [PATCH] OMAP: Fix broken omap-keypad Janusz Krzysztofik
2009-10-21 15:59 ` Tony Lindgren
2009-10-21 18:09   ` [PATCH] OMAP: Fix omap-keypad by restoring old keypad.h without breaking omap2 boards that use matrix_keypad Janusz Krzysztofik
2009-10-22 18:49     ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox