summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add force_suspend functionSteve Paik2018-01-191-0/+11
| | | | | | | | | | | | | | | | This CL implements a simple force_suspend(). This function takes a timeoutMs argument that is currently ignored. It also uses a two-stage init process that spawns the suspend_thread when autosuspend is in use. Follow-up CLs will: - Implement file locking to prevent multiple libsuspend instances from starting multiple suspend threads in the system. - Fully implement timout for force_suspend. - Integrate force_suspend with suspend_thred. Bug: 70669809 Test: autosuspend still works Change-Id: I6b2c72d0c61d1bec6db0f0b28481ffe0e20ec615
* Create wrapper function for set_wakeup_callbackSteve Paik2017-12-181-1/+1
| | | | | | | Bug: 70669809 Test: Compiles Change-Id: I55f8b9995c2d872504b586addb07a18206da7fbe
* Adds a parameter to the wakeup_callback to report sucessful wakeup or ↵Ruchi Kandoi2015-06-251-2/+5
| | | | | | | | | | | suspend aborts. Adds the call to wakeup_callback when the write to the /sys/power/state fails. This will help userspace account for the suspend aborts. Bug: 17478088 Bug: 18179405 Change-Id: Icd1194cfbaf61044ca0b2fe63a10a4c52e1535bc
* Add ability to have a callback when wakeups happen.Dianne Hackborn2014-03-071-0/+7
| | | | Change-Id: I02ff0e035bf8a97bd1a3b6b1699181fc3a137d79
* libsuspend: create new library to handle triggering suspendColin Cross2012-05-071-0/+48
libsuspend provides functions autosuspend_enable() and autosuspend_disable() to trigger suspend on a variety of different kernels. Change-Id: I5dc28fb51532fa7c514330f1cfde7698d31d734c