On Wednesday, 20 June 2007 16:08, Alan Stern wrote: > On Wed, 20 Jun 2007, Rafael J. Wysocki wrote: > > > > Not. Could pm_message_t have a member indicating the suspend state? > > > > Well, I thought about that, but I did't know what people on linux-pm would > > think about that. > > > > Alternatively, we could introduce a pm_target() global PM operation that will > > set the target sleep state for the entire system. > > > > I think we should discuss that on linux-pm before any decision is made. > > Pardon me for asking what may be a dumb question. Why does ACPI (or > anything else) need to know the target system state in order to decide > how a device should be suspended or whether wakeup should be enabled? The question isn't so dumb. ;-) For each device (handled by it) ACPI defines _SxD and _SxW methods returning the highest power (lowest number) D-state supported by the device in the (system-wide) state Sx and the lowest power (highest number) D-state in which the device can wake up the system being in the Sx sleep state, respectively. The target power state of the device should be determined on the basis of these values (along with the device's wake up setting) and they depend on the target system sleep state. Greetings, Rafael -- "Premature optimization is the root of all evil." - Donald Knuth - To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html