Skip to contentSkip to conversation

omap keypad H4 update

PATCH In review Komal Shah 2 participants 2 messages Feb 17, 2006 – Feb 20, 2006

Subsystems (4)
lore
Share & tools
lore

Komal Shah

author
#0 lore raw

PATCH 1/1 omap keypad H4 update

Move H4 Menelaus specific gpio settings to board-h4.c and fix get_row_gpio_val function.

---Komal Shah
http://komalshah.blogspot.com/

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

arch/arm/mach-omap2/board-h4.c +10 -0
index 9e64842..913ab3d 100644
@@ -34,6 +34,7 @@
 #include <asm/arch/board.h>
 #include <asm/arch/common.h>
 #include <asm/arch/keypad.h>
+#include <asm/arch/menelaus.h>
 #include "prcm-regs.h"
 
 #include <asm/io.h>
@@ -327,6 +328,15 @@ static void __init omap_h4_init(void)
 	omap_cfg_reg(K15_24XX_UART3_TX);
 	omap_cfg_reg(K14_24XX_UART3_RX);
 #endif
+
+#if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE)
+	if (omap_has_menelaus()) {
+		row_gpios[5] = 0;
+		col_gpios[2] = 15;
+		col_gpios[6] = 18;
+	}
+#endif
+
 	platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices));
 	omap_board_config = h4_config;
 	omap_board_config_size = ARRAY_SIZE(h4_config);
drivers/input/keyboard/omap-keypad.c +1 -1
index c7cbd85..e6057fa 100644
@@ -83,7 +83,7 @@ static u8 get_row_gpio_val(struct omap_k
 	int row;
 	u8 value = 0;
 
-	for (row = 0; row < omap_kp->cols; row++) {
+	for (row = 0; row < omap_kp->rows; row++) {
 		if (omap_get_gpio_datain(row_gpios[row]))
 			value |= (1 << row);
 	}
maintainer
#1 lore raw
Quoted 2 lines · Komal Shah

Move H4 Menelaus specific gpio settings to board-h4.c and fix get_row_gpio_val function.

Thanks, pushing today.

Tony