diff options
Diffstat (limited to 'drivers/misc/tegra-baseband/bb-oem1.c')
-rw-r--r-- | drivers/misc/tegra-baseband/bb-oem1.c | 11 |
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 = { |