On Tue, 23 Nov 2010, Rafael J. Wysocki wrote: > > Or maybe you think that when pm_runtime_put_sync detects the > > usage_count has decremented to 0 and the device is irq-safe, it should > > call rpm_suspend directly instead of calling rpm_idle? > > That also would work for me, actually. Okay, then consider this proposal. I'll introduce a new pm_runtime_put_sync_suspend() function which decrements the usage_count and calls rpm_suspend directly if the count drops to 0. Then interrupt handlers could use this function in place of pm_runtime_put_sync(), provided the device was irq-safe. Not only that, pm_runtime_put_sync_suspend() would be available for anyone to use. It must be reasonably common for runtime_idle routines to do nothing but call pm_runtime_suspend(). The new API call would save a little overhead. Alan Stern _______________________________________________ linux-pm mailing list linux-pm@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/linux-pm