Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 03 Oct 2003 20:34:40 -0000
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 39109 for review
Message-ID:  <200310032034.h93KYc9m009126@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=39109

Change 39109 by jhb@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200310032034.h93KYc9m009126>