On Wednesday 21 June 2006 10:04 am, Linus Torvalds wrote: > documentation. Much more important than documentation is just clear and > unambiguous interfaces. Right now, "suspend()" is _not_ that. It's not > clear and unambiguous at all, it's a muddy pit-hole of mixing different > things - you're supposed to do all of "freeze", "save state" and > "suspend") It's messy -- I don't like pm_message_t much at all -- but it's not as bad as you paint it. It's _always_ correct to do everything needed to enter STR ... fewer than 5% of today's drivers want to do anything fancier, like avoiding disk spindown, enabling wakeup events, etc. In fact that was true back in 2.4 kernels too. Hardly any drivers needed to do anything more than preparing for STR. The extra parameter to suspend() is only to support "advanced" PM mechanisms. Of course that means under-featured system PM -- we still suck at handling wakeup events -- but I figure the first milestone is getting systems to handle STR (and STD) at all, and doing anything advanced is a "phase 2" that not all drivers will ever reach. - Dave