Re: [PATCH][RFC] Proposal for a new watchdog interface using sysfs
Rusty Lynch (rusty@linux.co.intel.com)
14 Feb 2003 11:02:20 -0800
On Fri, 2003-02-14 at 09:55, Alan Cox wrote:
> On Fri, 2003-02-14 at 15:32, Rusty Lynch wrote:
> > Since only one driver can register as the /dev/watchdog (ie
> > major=10/minor=130 char device), would it be better if:
> >
> > * the first watchdog driver to register with the base also gets
> > registered as the watchdog misc device, and when that driver unregisters
> > then the second watchdog to register now gets registered as the misc
> > device, etc.
> > * each watchdog driver gets an additional sysfs file named 'misc', where
> > writing a '1' to the file causes the driver to become the registered
> > misc watchdog device.
> > * something else
>
> I had hoped we'd get some kind of sanity and 32bit dev_t by now at which
> point watchdogs belong on a major with /dev/watchdog0/1/2/3/... I dont
> think you need to care about that for now. Sysfs doesn't help here in
> the general case as it lacks persistant file permissions, but where it
> is used the user can simply make /dev/watchdog a link into sysfs and
> nothing has to be done by the driver
>
> Alan
>
If /dev/watchdog is a link to a sysfs file, then (at least in sysfs's
current state) you loose the ability to handle the documented watchdog
ioctl's. That is why I assumed that the watchdog base.c could implement
a miscdev registered for the watchdog minor (130), and then translate
the documented ioctl's into the watchdog_ops calls for the the specific
driver that is currently associated with the miscdevice.
Or... are you suggesting the ioctl interface is deprecated and
/dev/watchdog/ is a symbolic link to a given watchdog driver directory
in syfs?
--rustyl
-
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/