PERFORCE change 39109 for review
John Baldwin
jhb at FreeBSD.org
Fri Oct 3 13:34:40 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=39109
Change 39109 by jhb at jhb_laptop on 2003/10/03 13:34:00
Add some more notes about hooking up the glue to let the kernel
power devices down and then let userland ask the kernel to do so.
Affected files ...
.. //depot/projects/power/notes#5 edit
Differences ...
==== //depot/projects/power/notes#5 (text+ko) ====
@@ -20,6 +20,22 @@
- XXX: need to handle _PRx and _SxD !!
- We should be able to hook the power resource stuff up once we have
our power shadow tree in the acpi_SetPowerState() function.
+- define a bus method for powering up/down devices
+ - bus_set_powerstate(parent, child, state) where state is on or off
+- define either a device or syscall for asking new-bus to dispatch
+ commands to a given device
+ - The power command would be sent to the parent device using
+ device_get_parent() for the simple case (power off fdc0)
+- define a bus method to locate a child of a specific device by name
+ using a 'parent:child' syntax where the format of the "child" string
+ is defined by the parent driver. Thus, 'pci0:<slot>:<func>' might be
+ for PCI, 'eisa0:<slot>' for EISA, 'pccard0:' for a PCMCIA device in
+ slot 0, etc.
+ - Convert device_power() to use this method to look up the child device
+ if the name contains a colon instead of treating the name as a pure
+ name of the child device
+- Perhaps rename device_power() to device_command() to allow for other
+ commands like eject, etc.
- convert to a model of suspending the device via device_suspend()/resume()
rather than detach()/attach()
- This may require fixes to drivers so that they continue to function
More information about the p4-projects
mailing list