summaryrefslogtreecommitdiff
path: root/drivers/misc/tegra-baseband
diff options
context:
space:
mode:
authorRaj Jayaraman <rjayaraman@nvidia.com>2012-11-29 23:19:44 -0800
committerSimone Willett <swillett@nvidia.com>2012-12-03 16:20:36 -0800
commit2bbbe24eb1d4e379c4b2fe0f46a8b16d21c7fdb9 (patch)
tree0f7570556ca698b4789078fd4f0a0fcf407acafa /drivers/misc/tegra-baseband
parent684d5e0af77326432dda3a36ed13f5361bc91ddc (diff)
misc: tegra-baseband: Enable auto-suspend. Add additional
check for aborting system suspend. Bug 1054808 Change-Id: I24c8669052c91e9c4054e6731124d2e211939d00 Signed-off-by: Raj Jayaraman <rjayaraman@nvidia.com> Reviewed-on: http://git-master/r/167647 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Abhishek Shukla <abhisheks@nvidia.com> Tested-by: Abhishek Shukla <abhisheks@nvidia.com> Reviewed-by: Steve Lin <stlin@nvidia.com>
Diffstat (limited to 'drivers/misc/tegra-baseband')
-rw-r--r--drivers/misc/tegra-baseband/bb-oem1.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/misc/tegra-baseband/bb-oem1.c b/drivers/misc/tegra-baseband/bb-oem1.c
index 54189a1515b2..d782f4125e5f 100644
--- a/drivers/misc/tegra-baseband/bb-oem1.c
+++ b/drivers/misc/tegra-baseband/bb-oem1.c
@@ -302,6 +302,15 @@ static int l3_suspend(void)
static int l3_suspend_noirq(void)
{
+ bool wakeup_detected = bb_get_cwr();
+ bool crashed = bb_crashed();
+
+ /* If modem is initiating a wakeup, or it had crashed
+ abort system suspend. */
+ if (wakeup_detected || crashed) {
+ pr_info("%s: Aborting suspend.\n", __func__);
+ return 1;
+ }
return 0;
}
@@ -521,7 +530,7 @@ static struct tegra_bb_power_mdata bb_mdata = {
.vid = 0x045B,
.pid = 0x020F,
.wake_capable = true,
- .autosuspend_ready = false,
+ .autosuspend_ready = true,
};
static struct tegra_bb_power_data bb_data = {