On Thursday, 21 of February 2008, Linus Torvalds wrote:
Yes, I did.
acpi_pm_device_sleep_state() (that is called by acpi_pci_choose_state())
takes the target state directly from the ACPI layer.
We just want to get rid of the argument passed to ->suspend() eventually, but
there may be many _suspend_ states available (eg. "mem" and "standby") and
for each of them there may be different constraints on the device's state. We
have to tell the driver which device states are possible in the target system
sleep state. Right now we arbitrarily choose the one with the lowest power
usage - for given target system sleep state.
This interface is not available any more (ie. there's only "wakeup" in
/sys/devices/.../power).
Yes, I do.
You're wrong, sorry. With PM_EVENT_FREEZE it wouldn't even be necessary.
It's there, because potentially there are many possibilities with
PM_EVENT_SUSPEND and in fact it shouldn't even be used with
PM_EVENT_FREEZE.
All of this is more or less orthogonal to the issue at hand, which boils down
to the fact that we use the _suspend_ callbacks for hibernation and we
shouldn't be doing that.
Thanks,
Rafael
--