Hi Pavel! On Wed, Jun 3, 2009 at 6:37 AM, Pavel Machek <pavel@xxxxxx> wrote: >> > In the process of discussing a similar interface for OMAP, we dicussed >> > that having 3 states would be more useful. Specifically, and >> > _enable(), _idle() and _disable() hook. The _enable() and _idle() >> > hooks being exactly what you proposed above, but with the addition of >> > a _disable() hook which says not only can the device go idle, but that >> > the driver is really finished with the device. In this case, more >> > aggresive PM measures could be taken, such as turning of regulators >> > that may have long latencies that may not be appropriate to turn off >> > in idle. >> >> Hm.. I wonder when the driver is really finished with the device >> though. Only when the module is unloaded? If so then we could deal >> with the hard disable using platform bus notifiers (like in [04/04]). > > I'd guess that they call disable() when /dev node is closed... and > idle() when device is opened but inactive. But the time from close() to next open() is work load dependent. So the difference between _disable() and _idle() is pretty fuzzy in my opinion. I'm trying to think of a case where hard _disable() is needed, but nothing comes to mind. In my mind a single disable()/idle() function together with latency information is enough. It covers the entire range from _idle() to hard _disable(). / magnus _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm