diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2010-09-16 21:49:17 +0530 |
---|---|---|
committer | Bharat Nihalani <bnihalani@nvidia.com> | 2010-09-30 22:51:12 -0700 |
commit | 7b58d6bfad87dc9b7ccbe1b1e953bf5d76908db2 (patch) | |
tree | e8d6197fd90d7e229cb90c13aa830c252dfb6aef | |
parent | 7412861182283335445985f789cfa387c784590a (diff) |
[arm/tegra] kbc: Keep enabling if wake key configured in suspend/resume.
Keep enabling the kc controller only if any of keys are configured
as wakeup source during suspend.
bug 735233
(cherry picked from commit 13825a46587b0508aa7a43054964b76524d5f2b6)
Change-Id: I028965400ee4f96c1460f8e261a2376943384030
Reviewed-on: http://git-master/r/7499
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Tested-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
-rwxr-xr-x | arch/arm/mach-tegra/board-nvodm.c | 1 | ||||
-rwxr-xr-x | drivers/input/keyboard/tegra-kbc.c | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/board-nvodm.c b/arch/arm/mach-tegra/board-nvodm.c index bb3efa86bf20..029c432dba37 100755 --- a/arch/arm/mach-tegra/board-nvodm.c +++ b/arch/arm/mach-tegra/board-nvodm.c @@ -726,6 +726,7 @@ static noinline void __init tegra_setup_kbc(void) pr_err("%s: out of memory for key mapping\n", __func__); return; } + pdata->wake_cnt = 0; if (NvOdmKbcIsSelectKeysWkUpEnabled(&wake_row, &wake_col, &wake_num)) { BUG_ON(!wake_num || wake_num>=KBC_MAX_KEY); pdata->wake_cfg = kzalloc(sizeof(*pdata->wake_cfg)*wake_num, diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index 7797b47b78a0..2c69cf710259 100755 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c @@ -79,7 +79,7 @@ static int tegra_kbc_suspend(struct platform_device *pdev, pm_message_t state) { struct tegra_kbc *kbc = platform_get_drvdata(pdev); - if (device_may_wakeup(&pdev->dev)) { + if (device_may_wakeup(&pdev->dev) && kbc->pdata->wake_cnt) { tegra_kbc_setup_wakekeys(kbc, true); enable_irq_wake(kbc->irq); tegra_configure_dpd_kbc(kbc->wake_enable_rows, kbc->wake_enable_cols); @@ -97,7 +97,7 @@ static int tegra_kbc_resume(struct platform_device *pdev) { struct tegra_kbc *kbc = platform_get_drvdata(pdev); - if (device_may_wakeup(&pdev->dev)) { + if (device_may_wakeup(&pdev->dev) && kbc->pdata->wake_cnt) { disable_irq_wake(kbc->irq); tegra_kbc_setup_wakekeys(kbc, false); tegra_configure_dpd_kbc(0, 0); |