From a4636b2b328d1fde96f6c54d6ece0af51fec94bf Mon Sep 17 00:00:00 2001 From: Komal Shah Date: Mon, 20 Feb 2006 14:42:22 -0800 Subject: [PATCH] [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: Komal Shah Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-h4.c | 10 ++++++++++ drivers/input/keyboard/omap-keypad.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c index 9e64842f3f1..913ab3d24cd 100644 --- a/arch/arm/mach-omap2/board-h4.c +++ b/arch/arm/mach-omap2/board-h4.c @@ -34,6 +34,7 @@ #include #include #include +#include #include "prcm-regs.h" #include @@ -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); diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c index c7cbd855efd..e6057faf5d7 100644 --- a/drivers/input/keyboard/omap-keypad.c +++ b/drivers/input/keyboard/omap-keypad.c @@ -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); } -- 2.41.1