diff options
author | Shridhar Rasal <srasal@nvidia.com> | 2011-10-20 16:25:33 +0530 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:49:44 -0800 |
commit | df0eadd00f533e23fa5d47bbdaa5046446b650b2 (patch) | |
tree | 04fd48c32f2aec1ebb38af1b7c706e814d0977d4 /arch/arm/mach-tegra/board-whistler-kbc.c | |
parent | 01e776e0d3a36644297870d8cfd089761cc39e06 (diff) |
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 <srasal@nvidia.com>
Tested-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Rebase-Id: Rd658f960ea9f0b4e79bc99b0c4f159f030f65320
Diffstat (limited to 'arch/arm/mach-tegra/board-whistler-kbc.c')
-rw-r--r-- | arch/arm/mach-tegra/board-whistler-kbc.c | 16 |
1 files changed, 6 insertions, 10 deletions
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; |