]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] ARM: OMAP: omap keypad H4 update
authorKomal Shah <komal_shah802003@yahoo.com>
Mon, 20 Feb 2006 22:42:22 +0000 (14:42 -0800)
committerTony Lindgren <tony@atomide.com>
Mon, 20 Feb 2006 22:42:22 +0000 (14:42 -0800)
Move H4 Menelaus specific gpio settings to board-h4.c and fix
get_row_gpio_val function.

Signed-off-by: Komal Shah <komal_shah802003@yahoo.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/mach-omap2/board-h4.c
drivers/input/keyboard/omap-keypad.c

index 9e64842f3f11b516fa87d203ed5545894d62fed6..913ab3d24cd804bfb65c9393a071470ee6b8bec6 100644 (file)
@@ -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);
index c7cbd855efd59aa2532883dd9cb401a96e435f55..e6057faf5d749a221f4f920e2512688ce24e3b17 100644 (file)
@@ -83,7 +83,7 @@ static u8 get_row_gpio_val(struct omap_kp *omap_kp)
        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);
        }