Commit a4636b2b authored by Komal Shah's avatar Komal Shah Committed by Tony Lindgren

[PATCH] ARM: OMAP: omap keypad H4 update

Move H4 Menelaus specific gpio settings to board-h4.c and fix
get_row_gpio_val function.
Signed-off-by: default avatarKomal Shah <komal_shah802003@yahoo.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 2d1dcaf0
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <asm/arch/board.h> #include <asm/arch/board.h>
#include <asm/arch/common.h> #include <asm/arch/common.h>
#include <asm/arch/keypad.h> #include <asm/arch/keypad.h>
#include <asm/arch/menelaus.h>
#include "prcm-regs.h" #include "prcm-regs.h"
#include <asm/io.h> #include <asm/io.h>
...@@ -327,6 +328,15 @@ static void __init omap_h4_init(void) ...@@ -327,6 +328,15 @@ static void __init omap_h4_init(void)
omap_cfg_reg(K15_24XX_UART3_TX); omap_cfg_reg(K15_24XX_UART3_TX);
omap_cfg_reg(K14_24XX_UART3_RX); omap_cfg_reg(K14_24XX_UART3_RX);
#endif #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)); platform_add_devices(h4_devices, ARRAY_SIZE(h4_devices));
omap_board_config = h4_config; omap_board_config = h4_config;
omap_board_config_size = ARRAY_SIZE(h4_config); omap_board_config_size = ARRAY_SIZE(h4_config);
......
...@@ -83,7 +83,7 @@ static u8 get_row_gpio_val(struct omap_kp *omap_kp) ...@@ -83,7 +83,7 @@ static u8 get_row_gpio_val(struct omap_kp *omap_kp)
int row; int row;
u8 value = 0; 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])) if (omap_get_gpio_datain(row_gpios[row]))
value |= (1 << row); value |= (1 << row);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment