This is a topic that has come up several times in the last couple days in
Ottawa. I don't promise to have a complete solution, but this what I have
so far:
You have two things: a physical device and a number of logical interfaces
to communicate with the device. iSCSI devices, local disks, video devices,
mice, and joysticks are all physical devices and deserve a place in the
device tree.
RAID, LVM, DRI, and the input layer are all logical interfaces to physical
devices. The drivers are the conduit between the logical and the physical.
Drivers register devices with the logical interfcaces as their attached.
It's up to the driver to register with the interfaces, which they already
do. If registration gets generalized and centralized, you get internal
linkage between the interfaces and the devices. This is essentially the
device class voodoo that I've been talking about.
Concerning power management, if we have a list of interfaces, and each had
a suspend callback, you could notify the interfaces before you walked the
device tree. Maybe this could take care of verifying the devices can
suspend and failing if it's doing I/O that's too important to stop.
[ We could also create a swap interface that we skip over when we notify
these interfaces. Then we walk the tree and save state to the swap
devices. Then, tell the swap devices to suspend, which can notify the
devices to actually go to sleep....maybe..]
-pat
-
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/