[lkml]   [2002]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [DRIVER][RFC] SC1200 Watchdog driver
On Thu, Feb 21, 2002 at 01:57:43PM +0100, Christer Weinigel wrote:
> I'm not even sure if single-open sematics are neccesary at all, but I
> copied most of the interface from wdt285.c so I copied this too. The
> watchdog API seems to be a rather ad hoc thing. For example I just
> noticed that the WDIOC_SETTIMEOUT call probably takes a parameter
> which seems to be minutes, not seconds. "Someone (tm)" ought to write
> a more formal API specification.

WDIOC_SETTIMEOUT is defined as being in seconds. This is
commented in linux/watchdog.h against the WDIOF_SETTIMOUT flag. Where
you see funky math against the passed parameter is where a watchdog card
takes strange values on its hardware and the driver is computing the
proper strange value for the given amount of seconds.
Also note that WDIOC_SETTIMEOUT rounds up to the nearest second
interval the watchdog can handle if the watchdog cannot support the
passed interval. For this reason, it always returns the actual timeout
set in the passed int*. This is usually done with the fall-through to
You don't see WDIOC_SETTIMEOUT in 2.4.17 because it was added in



"To fall in love is to create a religion that has a fallible god."
-Jorge Luis Borges
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:24    [W:0.115 / U:1.812 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site