From df0eadd00f533e23fa5d47bbdaa5046446b650b2 Mon Sep 17 00:00:00 2001 From: Shridhar Rasal Date: Thu, 20 Oct 2011 16:25:33 +0530 Subject: arm: tegra: whistler: set proper pin configuration Set pin configuration information for required rows and columns. Enable only required ROW and COL gpio. bug 889620 Change-Id: I4965fc8db89ccc79c12e4295b9afdef635e6c909 Reviewed-on: http://git-master/r/59155 Reviewed-by: Shridhar Rasal Tested-by: Shridhar Rasal Reviewed-by: Bharat Nihalani Rebase-Id: Rd658f960ea9f0b4e79bc99b0c4f159f030f65320 --- arch/arm/mach-tegra/board-whistler-kbc.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'arch/arm/mach-tegra/board-whistler-kbc.c') diff --git a/arch/arm/mach-tegra/board-whistler-kbc.c b/arch/arm/mach-tegra/board-whistler-kbc.c index a2f1324fcc7b..cfa673bc7ce9 100644 --- a/arch/arm/mach-tegra/board-whistler-kbc.c +++ b/arch/arm/mach-tegra/board-whistler-kbc.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010 NVIDIA, Inc. + * Copyright (C) 2010-2011 NVIDIA, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as @@ -120,19 +120,15 @@ int __init whistler_kbc_init(void) int i; pr_info("KBC: whistler_kbc_init\n"); - - /* Setup the pin configuration information. */ - for (i = 0; i < KBC_MAX_GPIO; i++) { - data->pin_cfg[i].num = 0; - data->pin_cfg[i].is_row = false; - } - - for (i = 0; i < KBC_MAX_ROW; i++) { + for (i = 0; i < WHISTLER_ROW_COUNT; i++) { data->pin_cfg[i].num = i; data->pin_cfg[i].is_row = true; + data->pin_cfg[i].en = true; } - for (i = 0; i < KBC_MAX_COL; i++) + for (i = 0; i < WHISTLER_COL_COUNT; i++) { data->pin_cfg[i + KBC_MAX_ROW].num = i; + data->pin_cfg[i + KBC_MAX_ROW].en = true; + } platform_device_register(&whistler_kbc_device); return 0; -- cgit v1.2.3