ARM: Tegra: Roth: Add Hall Effect Sensor
Matt Wagner [Sat, 17 Nov 2012 05:09:43 +0000 (21:09 -0800)]
Add Hall Effect sensor GPIO_KEY as SW_LID and
set pinmux to PULL_UP since the key is active low

Bug 1163078

Reviewed-on: http://git-master/r/164523
(cherry picked from commit 021015f4bd91180c80d3f593c6f63b0038f20eef)
Change-Id: Iea2ff6064d8c6e1e2d32d17b54ef927bb675c84d
Signed-off-by: Matt Wagner <mwagner@nvidia.com>
Signed-off-by: Vikram Kanigiri <vkanigiri@nvidia.com>
Reviewed-on: http://git-master/r/164936
Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>

arch/arm/mach-tegra/board-roth-kbc.c
arch/arm/mach-tegra/board-roth-pinmux.c

index 3fee6ac..45228b8 100644 (file)
@@ -49,8 +49,7 @@ static struct gpio_keys_button roth_p2454_keys[] = {
        [0] = GPIO_KEY(KEY_POWER, PR0, 1),
        [1] = GPIO_KEY(KEY_VOLUMEUP, PR2, 0),
        [2] = GPIO_KEY(KEY_VOLUMEDOWN, PR1, 0),
-/* TODO: Add Hall Sensor */
-/*     [3] = {
+       [3] = {
                .code = SW_LID,
                .gpio = TEGRA_GPIO_HALL,
                .irq = -1,
@@ -59,7 +58,7 @@ static struct gpio_keys_button roth_p2454_keys[] = {
                .active_low = 1,
                .wakeup = 1,
                .debounce_interval = 100,
-       },*/
+       },
 };
 
 static struct gpio_keys_platform_data roth_p2454_keys_pdata = {
index 61a84ae..598cf6c 100644 (file)
@@ -235,7 +235,7 @@ static __initdata struct tegra_pingroup_config roth_pinmux_set_nontristate[] = {
        DEFAULT_PINMUX(KB_ROW3,         KBC,    PULL_DOWN,    NORMAL,    INPUT),
        DEFAULT_PINMUX(KB_ROW4,         KBC,    PULL_DOWN,    NORMAL,    INPUT),
        DEFAULT_PINMUX(KB_ROW6,         KBC,    PULL_DOWN,    NORMAL,    INPUT),
-       DEFAULT_PINMUX(KB_ROW8,         KBC,    PULL_DOWN,    NORMAL,    INPUT),
+       DEFAULT_PINMUX(KB_ROW8,         KBC,    PULL_UP,    NORMAL,    INPUT),
 
        DEFAULT_PINMUX(CLK3_REQ,        RSVD3,  NORMAL,      NORMAL,    OUTPUT),
        DEFAULT_PINMUX(GPIO_PU4,        RSVD3,  NORMAL,      NORMAL,    OUTPUT),