summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2011-10-31 15:38:20 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:49:59 -0800
commitf060b7365bf227bfd71584f4e24bdd27796eadbd (patch)
treeae87845db9b3b9d9f5e1e2d355f6e0a7cea4b5eb /arch
parentbec3be681c1b4feba7b8f9679952a650d16343da (diff)
arm: tegra: cardhu: pm299: Onkey support
Enabling the onkey for pm299 based system. This will be used to wakeup/suspend the system. Reviewed-on: http://git-master/r/61901 (cherry picked from commit e86410259e234d0c6ab9acdab7ab0e0fa36309ca) Change-Id: I48c1e8ad44fa1a991b357e924baf9e0b3ba74563 Reviewed-on: http://git-master/r/62914 Reviewed-by: Lokesh Pathak <lpathak@nvidia.com> Tested-by: Lokesh Pathak <lpathak@nvidia.com> Rebase-Id: R075c1d69a70af7d4b90a61315ed1b025528fce61
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-tegra/board-cardhu-kbc.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-kbc.c b/arch/arm/mach-tegra/board-cardhu-kbc.c
index 586e5ffa6ed9..29e9bfc2dd8a 100644
--- a/arch/arm/mach-tegra/board-cardhu-kbc.c
+++ b/arch/arm/mach-tegra/board-cardhu-kbc.c
@@ -224,6 +224,10 @@ static struct interrupt_keys_button cardhu_int_keys[] = {
[1] = INT_KEY(KEY_POWER, TPS6591X_IRQ_BASE + TPS6591X_INT_PWRON_LP, 0, 8000),
};
+static struct interrupt_keys_button cardhu_pm299_int_keys[] = {
+ [0] = INT_KEY(KEY_POWER, RICOH583_IRQ_BASE + RICOH583_IRQ_ONKEY, 0, 100),
+};
+
static struct interrupt_keys_platform_data cardhu_int_keys_pdata = {
.int_buttons = cardhu_int_keys,
.nbuttons = ARRAY_SIZE(cardhu_int_keys),
@@ -241,6 +245,7 @@ int __init cardhu_keys_init(void)
{
int i;
struct board_info board_info;
+ struct board_info pmu_board_info;
tegra_get_board_info(&board_info);
if (!((board_info.board_id == BOARD_E1198) ||
@@ -268,6 +273,14 @@ int __init cardhu_keys_init(void)
}
/* Register on-key through pmu interrupt */
+ tegra_get_pmu_board_info(&pmu_board_info);
+
+ if (pmu_board_info.board_id == BOARD_PMU_PM299) {
+ cardhu_int_keys_pdata.int_buttons = cardhu_pm299_int_keys;
+ cardhu_int_keys_pdata.nbuttons =
+ ARRAY_SIZE(cardhu_pm299_int_keys);
+ }
+
if ((board_info.board_id == BOARD_E1291) ||
(board_info.board_id == BOARD_E1198) ||
(board_info.board_id == BOARD_E1257) ||