Re: [RFC] input: syfs switches for SKE keypad

Alan Stern
2010-10-12T00:08:57Z

On Tue, 12 Oct 2010, Rafael J. Wysocki wrote:

> It seems to me that for some devices it might be more convenient to have
> an "execute pm_runtime_idle() for this device right now" sysfs trigger
> (and analogously for resume).

Indeed, or even "execute pm_runtime_suspend()". If the driver uses
autosuspend then the runtime_idle callback will call
pm_runtime_autosuspend, which won't do what you want.

> Anyway, please note that the scenario in which the driver detects inactivity
> and suspends the device in response is not the only one possible. The other
> one is that the driver is told to suspend the device and then blocks apps
> wanting to access it until resumed.

But it initiates a resume as soon as an app tries to use the device,
right? Otherwise you've got a "sticky off", as Dmitry would say.

> Right now we have interfaces for the
> former, but not for the latter.

If it's not a "sticky off", power/control implements the latter
interface.

Alan Stern