Subject: Re: More Device Properties
To: None <firstname.lastname@example.org>
From: Matthew Orgass <email@example.com>
Date: 02/19/2001 23:33:52
On 16 Feb 2001 firstname.lastname@example.org wrote:
> The second phase will separate the `struct device' from the device's softc.
> config_create(9) will create the true device node, which config_found*(9) will
> attach to the device tree. If the device probes successfully,
> config_attach(9) will allocate a separate device softc structure and link it
> to `struct device'. If devices are detached, the `struct device' will remain
> with all its properties but the softc will be destroyed. This change will
> cause breakage in practically all existing device drivers, so it will be
> relegated to some future date.
Going a little further in this direction, how about using ioctl for
properties? Many of the properties could be interesting to userland as
well, and ioctl already has a type mechanism.
To do this, the driver entry points need to be made accessable from the
struct device. This is also the fist step in removing the internal use of
Device properties could then be accessed by devioctl(struct device *,
etc.) which calls the device ioctl routine (if any) and then, if the
device does not deal with the request, md_devioctl() to do OFW properties