[PATCH] Watchdog: OMAP: Fix the runtime pm code to avoid module getting stuck intransition state.
From: Zumeng Chen <hidden>
Date: 2012-07-09 01:16:34
? 2012?07?08? 17:26, Wim Van Sebroeck ??:
Hi All,quoted
Hello, Lokesh, One question: Does "echo 1> /dev/watchdog" work well? Regards, ZumengPlease note hat "echo 1> /dev/watchdog" for drivers that have the WDIOF_MAGICCLOSE flag set, reboots the system. This is because it opens the watchdog device ; then writes the characters "1" to it and then closes the watchdog. So the watchdog keeps running (because it didn't see the magic char "V" written to it).
Yes, this is _absolutely_ right.
In this case (omap_wdt) it opens the watchdog device (and starts the watchdog) then it writes a "1" to the watchdog (so basically the watchdog is being pinged) and then closes the watchdog device (which stops the watchdog if NOWAYOUT was not set).
Wim, Agreed for all above, sorry for jumping in: I just have a little question about this patch: we have enable pm_runtime_enable(wdev->dev) in probe, and do ret = misc_register(&(wdev->omap_wdt_miscdev)); Then this patch wants to remove pm_runtime_get_sync in file operation function, is that right? Regards, Zumeng
Kind regards, Wim.