On Tue, Sep 25, 2012 at 01:56:13PM +0200, Linus Walleij wrote:
In ux500 drivers we use *specific* (as opposed to generic) runtime PM code to e.g. get some hysteresis before a drivers clock and pins (etc) are put to sleep. Pure driver business.
Right, the runtime PM infrastructure is really useful for this stuff.
Devices that can be wake sources are an example here, if they are doing that then turning them completely off may break functionality but you can still turn some of the device (possibly a varying selection depending on usage) off. For simple cases it works well and it'd be good to have it but you end up back into ignoring errors...
Our ux500 "sleep" state on the pins will put them into the apropriate wakeup mode where applicable. Since this may vary across boards it's even machine-specific.
Configuring wakeup sources when going to a state named "sleep" seems intuitive to me atleast.
For some devices the set of wakeup sources vary depending on the current system state - for example, if a cable is plugged into a connector we may have to keep some additional things on to monitor activity on the cable. This isn't the common case, for most things a sleep state works fine, but it does come up.