public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Questions about Watch Dog Timer under Linux.
@ 2009-12-09 14:47 Cypher Wu
  2009-12-09 14:59 ` Mark Brown
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Cypher Wu @ 2009-12-09 14:47 UTC (permalink / raw)
  To: linux-kernel

I'm used to work on embedded systems, the Watch Dog Timer in our
products is usually a seperate chip on the board wich will start to
work after power reset and will time out in 2 seconds. The system has
to start dog clearing from the very beginning and there have no way to
disable WDT.
Now I want to use WDT under Linux, while I read
Documentation/watchdog/watchdog-api.txt and then look though some
drivers of WDT under Linux, it seems WDT under Linux has to be able to
be disabled, and it will be disabled from the beginning, and starting
to work after the application open the special driver file?  The
sample code under Linux use a very bigger time span than our embedded
system:
	while (1) {
		ret = write(fd, "\0", 1);
		if (ret != 1) {
			ret = -1;
			break;
		}
		ret = fsync(fd);
		if (ret)
			break;
		sleep(10);
	}


Is this the pattern we have to follow to use WDT under Linux? We have
to choose a chip as WDT, and it seems the chip we've familiar under
embedded systems can't be used under Linux?

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2009-12-13  1:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-09 14:47 Questions about Watch Dog Timer under Linux Cypher Wu
2009-12-09 14:59 ` Mark Brown
2009-12-11  8:27   ` Cypher Wu
2009-12-11 10:21     ` Mark Brown
2009-12-12  3:46       ` Cypher Wu
2009-12-12 13:50         ` Alan Cox
2009-12-09 16:29 ` Alan Cox
2009-12-11  8:33   ` Cypher Wu
2009-12-09 17:26 ` Pádraig Brady
2009-12-11  8:38   ` Cypher Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox