lkml.org 
[lkml]   [2006]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC] Watchdog device class
From
Date
On Llu, 2006-04-17 at 21:39 +0200, Rudolf Marek wrote:
> The char device of watchdog class is compatible with existing watchdog API,
> so no need to change the user applications. There is just one exception
> and this is temperature handling. I belive it should be implemented not
> via IOCTL but using the HWMON class. (100% compatibility can be restored
> with the ioctl class op)

Then it should be kept.

The watchdog API simply pre-dates the sysfs world, it goes back to the
1.0-1.2 era and has remained very consistent since that time.

If you expose it in sysfs somewhere (which I think is a good idea) then
the units should probably also be fixed in the sysfs case to be metric
(ie Kelvin or Centigrade float values) [or scaled int]

> int (*set_timeout)(struct device *, int sec);

Pass the usual time structures instead. Seconds is a field so it is free
but it means all the signed/unsigned stuff and any future subsecond
watchdogs for embedded environments don't break stuff.

> int (*notify_reboot)(struct notifier_block *this, unsigned long code,
> void *unused);

Can this not use the power management callbacks from the device model
instead

> /* this may be removed in the future */
> struct watchdog_info legacy_info;

This wants breaking out into sysfs, but again the ioctls are expected
and standardised for years now.



People have talked about sorting out a watchdog helper library for years
so this is overdue, and doing it with the class model in mind is even
better.

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-04-17 23:24    [W:1.165 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site