public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Rudolf Marek <r.marek@sh.cvut.cz>
Cc: wim@iguana.be, linux-kernel@vger.kernel.org
Subject: Re: [RFC] Watchdog device class
Date: Mon, 17 Apr 2006 22:31:35 +0100	[thread overview]
Message-ID: <1145309500.14497.6.camel@localhost.localdomain> (raw)
In-Reply-To: <4443EED9.30603@sh.cvut.cz>

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


  reply	other threads:[~2006-04-17 21:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-17 19:39 [RFC] Watchdog device class Rudolf Marek
2006-04-17 21:31 ` Alan Cox [this message]
2006-04-18 18:35   ` Rudolf Marek
2006-04-18 20:16     ` Alan Cox
2006-04-18  0:54 ` Arnd Bergmann
2006-04-18 19:32   ` Rudolf Marek
2006-04-18 22:24     ` Mark Rustad
2006-04-18 19:57 ` Wim Van Sebroeck
2006-04-18 20:59   ` Rudolf Marek
2006-04-19 21:02     ` Wim Van Sebroeck
2006-04-19 21:24       ` Rudolf Marek
2006-08-15 17:13         ` Wim Van Sebroeck
2006-09-14 12:19           ` Rudolf Marek
2006-04-18 23:07 ` Corey Minyard
2006-04-19 21:04   ` Wim Van Sebroeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1145309500.14497.6.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=r.marek@sh.cvut.cz \
    --cc=wim@iguana.be \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox