mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
soc: qcom: Handle device hangs during suspend/resume
As cpus can serve ipis and timers during suspend and resume; msm watchdog would periodically pet hardware, even when some of suspend/resume callbacks are stuck, due to software deadlocks. This can cause device hangs, particularly when noirq callbacks are stuck. To recover from this, register late suspend (and early resume) callbacks in msm watchdog; these callbacks would disable/enable watchdog pet. Change-Id: Id12251f2bb6565b04a59802a53b6c3cadd017327 Signed-off-by: Neeraj Upadhyay <[email protected]> Signed-off-by: Prateek Sood <[email protected]>
This commit is contained in:
parent
62ea1d38b6
commit
49148c6626
4 changed files with 71 additions and 5 deletions
|
|
@ -261,6 +261,13 @@ static int hh_wdt_probe(struct platform_device *pdev)
|
|||
return qcom_wdt_register(pdev, wdog_dd, "hh-watchdog");
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops hh_wdt_dev_pm_ops = {
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
.suspend_late = qcom_wdt_pet_suspend,
|
||||
.resume_early = qcom_wdt_pet_resume,
|
||||
#endif
|
||||
};
|
||||
|
||||
static const struct of_device_id hh_wdt_match_table[] = {
|
||||
{ .compatible = "qcom,hh-watchdog" },
|
||||
{}
|
||||
|
|
@ -271,6 +278,7 @@ static struct platform_driver hh_wdt_driver = {
|
|||
.remove = qcom_wdt_remove,
|
||||
.driver = {
|
||||
.name = "hh-watchdog",
|
||||
.pm = &hh_wdt_dev_pm_ops,
|
||||
.of_match_table = hh_wdt_match_table,
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue