Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 40bd1e7d authored by Prasad Sodagudi's avatar Prasad Sodagudi
Browse files

soc: qcom: watchdog-v2: Update last_pet during the suspend and resume



Currently last_pet time variable is not updated properly during
the device suspend and resume. When watchdog bark is reported,
last_pet does not have proper value and leading to
misinterpretation on watchdog's last pet. Hence update
the last_pet during the suspend and resume.

Change-Id: I92b8b15e0830985415b3a3910c23c5aa3bebd6b3
Signed-off-by: default avatarPrasad Sodagudi <psodagud@codeaurora.org>
parent 7e02cedd
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -106,6 +106,7 @@ static int msm_watchdog_suspend(struct device *dev)
	__raw_writel(0, wdog_dd->base + WDT0_EN);
	mb();
	wdog_dd->enabled = false;
	wdog_dd->last_pet = sched_clock();
	return 0;
}

@@ -119,6 +120,7 @@ static int msm_watchdog_resume(struct device *dev)
	__raw_writel(1, wdog_dd->base + WDT0_RST);
	mb();
	wdog_dd->enabled = true;
	wdog_dd->last_pet = sched_clock();
	return 0;
}