ARM: tegra: dalmore: add kbc interrupt for e1611
Ray Poudrier [Tue, 18 Sep 2012 23:33:47 +0000 (16:33 -0700)]
Signed-off-by: Ray Poudrier <rapoudrier@nvidia.com>
Change-Id: I6bfc634b792170a81351f849d1eb9dd55572285b
Reviewed-on: http://git-master/r/133687
(cherry picked from commit 9f2f20d2fd40556c48644490d934d6841794fcef)
Reviewed-on: http://git-master/r/159483
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>

Rebase-Id: R929f948bb7634191ecec2d210527f3762e3577ec

arch/arm/mach-tegra/board-dalmore-kbc.c

index e6a81d1..251151b 100644 (file)
@@ -27,6 +27,7 @@
 #include <mach/kbc.h>
 #include <linux/gpio.h>
 #include <linux/gpio_keys.h>
+#include <linux/mfd/palmas.h>
 
 #include "tegra-board-id.h"
 #include "board.h"
@@ -92,11 +93,22 @@ static struct gpio_keys_button dalmore_int_keys[] = {
                                MAX77663_IRQ_ONOFF_EN0_1SEC, 0, 3000),
 };
 
+static struct gpio_keys_button dalmore_e1611_int_keys[] = {
+       [0] = GPIO_IKEY(KEY_POWER, PALMAS_TEGRA_IRQ_BASE +
+                               PALMAS_PWRON_IRQ, 1, 100),
+};
+
+
 static struct gpio_keys_platform_data dalmore_int_keys_pdata = {
        .buttons        = dalmore_int_keys,
        .nbuttons       = ARRAY_SIZE(dalmore_int_keys),
 };
 
+static struct gpio_keys_platform_data dalmore_e1611_int_keys_pdata = {
+       .buttons        = dalmore_e1611_int_keys,
+       .nbuttons       = ARRAY_SIZE(dalmore_e1611_int_keys),
+};
+
 static struct platform_device dalmore_int_keys_device = {
        .name   = "gpio-keys",
        .id     = 0,
@@ -105,6 +117,14 @@ static struct platform_device dalmore_int_keys_device = {
        },
 };
 
+static struct platform_device dalmore_e1611_int_keys_device = {
+       .name   = "gpio-keys",
+       .id     = 0,
+       .dev    = {
+               .platform_data  = &dalmore_e1611_int_keys_pdata,
+       },
+};
+
 int __init dalmore_kbc_init(void)
 {
        struct tegra_kbc_platform_data *data = &dalmore_kbc_platform_data;
@@ -130,6 +150,8 @@ int __init dalmore_kbc_init(void)
        tegra_get_board_info(&board_info);
        if (board_info.board_id != BOARD_E1611)
                platform_device_register(&dalmore_int_keys_device);
+       else if (board_info.board_id == BOARD_E1611)
+               platform_device_register(&dalmore_e1611_int_keys_device);
 
        return 0;
 }