[PATCH] OMAP: Fix broken omap-keypad

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxx>

---
--- 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
 
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux