Ventana: KBC: Removing the KBC usage on ventana
Ramalingam C [Tue, 13 Sep 2011 12:19:11 +0000 (17:19 +0530)]
On Ventana, Keys are handled through the GPIO driver. So CONFIG_KEYBOARD_TEGRA
should not be defined

On LDK, kernel defconfig of Harmony is shared with Ventana(to move towards
SingleBinary for multiple tegra boards). Since on Harmony we have
to support the matrix keyboard through KBC, we have enabled the KBC driver by
defining CONFIG_KEYBOARD_TEGRA which reflects in Ventana also.
This situation leads to an spurious interrupt from KBC as soon as system
enters into the LP0 state.

To avoid the early exit from LP0, we are removing the KBC device registration
on board_ventana.c

Bug 869778

Reviewed-on: http://git-master/r/52049
(cherry picked from commit 68f4c9bbf9b533fd44215d26b3d0acf11865a819)

Change-Id: I8fe42bbe5d5bd41dd1737bca9af9e35611443f40
Reviewed-on: http://git-master/r/54422
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: Ra71aa54f1b8d7f8d30ca45c36e2b8d130969b62e

arch/arm/mach-tegra/Makefile
arch/arm/mach-tegra/board-ventana-kbc.c [deleted file]
arch/arm/mach-tegra/board-ventana.c

index c426432..0b33f3e 100644 (file)
@@ -119,7 +119,6 @@ obj-${CONFIG_MACH_VENTANA}              += board-ventana-sdhci.o
 obj-${CONFIG_MACH_VENTANA}              += board-ventana-power.o
 obj-${CONFIG_MACH_VENTANA}              += board-ventana-panel.o
 obj-${CONFIG_MACH_VENTANA}              += board-ventana-sensors.o
-obj-${CONFIG_MACH_VENTANA}              += board-ventana-kbc.o
 obj-${CONFIG_MACH_VENTANA}              += board-ventana-memory.o
 
 obj-${CONFIG_MACH_ARUBA}                += board-aruba.o
diff --git a/arch/arm/mach-tegra/board-ventana-kbc.c b/arch/arm/mach-tegra/board-ventana-kbc.c
deleted file mode 100644 (file)
index e54a450..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * 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
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- * 02111-1307, USA
- */
-
-/*
-* Warning: Ventana might need some hardware rework to be able to work with
-* kbc-driver. Default Ventana h/w configuration should use GPIO keyboard
-* driver instead
-*/
-
-#include <linux/kernel.h>
-#include <linux/platform_device.h>
-#include <linux/input.h>
-#include <linux/device.h>
-
-#include <mach/clk.h>
-#include <mach/iomap.h>
-#include <mach/irqs.h>
-#include <mach/pinmux.h>
-#include <mach/iomap.h>
-#include <mach/io.h>
-#include <mach/kbc.h>
-
-#include <asm/mach-types.h>
-#include <asm/mach/arch.h>
-
-#define VENTANA_ROW_COUNT      15
-#define VENTANA_COL_COUNT      7
-
-static const u32 ventana_keymap[] = {
-       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-                       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-                       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-                       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-                       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-                       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-                       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-                       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-                       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-                       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-                       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-                       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-                       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-                       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-                       KEY_RESERVED, KEY_RESERVED, KEY_RESERVED,
-       KEY_RESERVED, KEY_HOME, KEY_BACK, KEY_MENU,
-                       KEY_VOLUMEDOWN, KEY_VOLUMEUP, KEY_RESERVED,
-};
-
-
-
-static const struct matrix_keymap_data ventana_keymap_data = {
-       .keymap         = ventana_keymap,
-       .keymap_size    = ARRAY_SIZE(ventana_keymap),
-};
-
-static struct tegra_kbc_wake_key ventana_wake_cfg[] = {
-       [0] = {
-               .row = 14,
-               .col = 1,
-       },
-};
-
-static struct tegra_kbc_platform_data ventana_kbc_platform_data = {
-       .debounce_cnt = 20,
-       .repeat_cnt = 50 * 32,
-       .wake_cnt = 1,
-       .wake_cfg = &ventana_wake_cfg[0],
-       .keymap_data = &ventana_keymap_data,
-};
-
-static struct resource ventana_kbc_resources[] = {
-       [0] = {
-               .start = TEGRA_KBC_BASE,
-               .end   = TEGRA_KBC_BASE + TEGRA_KBC_SIZE - 1,
-               .flags = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start = INT_KBC,
-               .end   = INT_KBC,
-               .flags = IORESOURCE_IRQ,
-       },
-};
-
-struct platform_device ventana_kbc_device = {
-       .name = "tegra-kbc",
-       .id = -1,
-       .dev = {
-               .platform_data = &ventana_kbc_platform_data,
-       },
-       .resource = ventana_kbc_resources,
-       .num_resources = ARRAY_SIZE(ventana_kbc_resources),
-};
-
-int __init ventana_kbc_init(void)
-{
-       struct tegra_kbc_platform_data *data = &ventana_kbc_platform_data;
-       int i;
-
-       pr_info("KBC: ventana_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 < VENTANA_ROW_COUNT; i++) {
-               data->pin_cfg[i].num = i;
-               data->pin_cfg[i].is_row = true;
-       }
-
-       for (i = 0; i < VENTANA_COL_COUNT; i++) {
-               data->pin_cfg[i + VENTANA_ROW_COUNT].num = i;
-               data->pin_cfg[i + VENTANA_ROW_COUNT].is_row = false;
-       }
-       platform_device_register(&ventana_kbc_device);
-       return 0;
-}
index 5b0f867..c986e4f 100644 (file)
@@ -129,7 +129,6 @@ static __initdata struct tegra_clk_init_table ventana_clk_init_table[] = {
        { "blink",      "clk_32k",      32768,          false},
        { "pll_p_out4", "pll_p",        24000000,       true },
        { "pwm",        "clk_32k",      32768,          false},
-       { "kbc",        "clk_32k",      32768,          true},
        { "i2s1",       "pll_a_out0",   0,              false},
        { "spdif_out",  "pll_a_out0",   0,              false},
        { NULL,         NULL,           0,              0},
@@ -610,9 +609,6 @@ static void __init tegra_ventana_init(void)
 #ifdef CONFIG_KEYBOARD_GPIO
        ventana_keys_init();
 #endif
-#ifdef CONFIG_KEYBOARD_TEGRA
-       ventana_kbc_init();
-#endif
 
        ventana_usb_init();
        ventana_gps_init();