summaryrefslogtreecommitdiffstats
path: root/libsuspend
Commit message (Collapse)AuthorAgeFilesLines
* Mark the modules as VNDK in Android.bpJustin Yun2017-09-141-0/+3
| | | | | | | | | | | | | | | | | | | As a VNDK module, Android.bp must have 'vndk' tag as well as 'vendor_available: true'. The 'vndk' tag for VNDK module is formated as below: vndk: { enabled: true, }, VNDK modules will be installed both in system/lib(64) as normal and in system/lib(64)/vndk as a vendor variant. Bug: 63866913 Test: build and boot with BOARD_VNDK_VERSION=current Merged-In: Icecb22ed2ed0f58c3168605d4cf64815e2dda750 Change-Id: Icecb22ed2ed0f58c3168605d4cf64815e2dda750 (cherry picked from commit 9b0ed7294273d5f10020388e5a5b7e545a2fd1de)
* Merge "Mark libsuspend vendor_available." am: 6e2d24ab5a am: 1c8e482995Jayant Chowdhary2017-05-251-0/+2
|\ | | | | | | | | | | am: 89fc3a6525 Change-Id: I77469e8a33fcee1eeba37ceebbb39ccfc0a047c3
| * Mark libsuspend vendor_available.Jayant Chowdhary2017-05-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | libsuspend belongs to vndk-cap. Mark it vendor_available to enable vndk abi stability checks on it. Details: https://android-review.googlesource.com/368372 Test: mm -j64 Bug: 38244611 Change-Id: I2243c6d8710b6b2f80375849e82afba28a735507
* | resolve merge conflicts of a45b1d6f3 to masterMark Salyzyn2017-01-112-2/+2
|\| | | | | | | | | | | Test: compile Bug: 30465923 Change-Id: I648855539df3cfa176c6ecac19b6a562ba6feaf7
| * Merge "liblog: use log/log.h when utilizing ALOG macros" am: 01e12b4ee7Mark Salyzyn2017-01-114-4/+4
| |\ | | | | | | | | | | | | | | | am: c3b346ea93 Change-Id: I0ee5652701e23d751def8bac82534af530ea5dc8
| | * liblog: use log/log.h when utilizing ALOG macrosMark Salyzyn2017-01-114-4/+4
| | | | | | | | | | | | | | | | | | Test: compile Bug: 30465923 Change-Id: Id6d76510819ebd88c3f5003d00d73a0dbe85e943
* | | libsuspend: remove autosleep and earlysuspendTim Murray2016-11-024-336/+0
|/ / | | | | | | | | | | | | | | | | | | | | autosleep and earlysuspend are long-deprecated, so remove them to make libsuspend slightly more comprehensible. Test: builds and still suspends on marlin bug 32621856 Change-Id: I66a904c3fce0111fb5e9d1ab9d205c97617ae210
* | Revert "libsuspend: move to exponential backoff" am: 23c8bab024Tim Murray2016-10-181-19/+5
|\ \ | |/ |/| | | | | | | am: 4dcd461945 Change-Id: Ie1087acf944c43ab2c4f02a63817563d6125393f
| * Revert "libsuspend: move to exponential backoff"Tim Murray2016-10-181-19/+5
| | | | | | | | | | | | | | | | This reverts commit fb896944b6a78d951c8442b444af860a28117e5c. bug 32180327 Change-Id: Ic26bdffac6c56b102348f5393e6eb5d895960d7e
* | libsuspend: move to exponential backoff am: fb896944b6Tim Murray2016-10-121-5/+19
|\| | | | | | | | | | | am: cf11830695 Change-Id: Ic3289a6cf433ee1c0c9b468ea8380493663ed84f
| * libsuspend: move to exponential backoffTim Murray2016-10-111-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | If for some reason the system can't suspend (usually a driver bug), libsuspend will currently attempt to retry suspend after 100ms. Because entering suspend takes a significant amount of CPU time, this can be extremely expensive and be a major contributor to rapid battery drain. Move autosuspend to use exponential backoff if the previous suspend attempt failed. bug 32092914 Change-Id: I3e9e944f290de5f1853a02e3f61721ba9159df46
* | system/core Replace cutils/log.h with android/log.hMark Salyzyn2016-09-304-10/+14
| | | | | | | | | | | | | | | | | | | | | | Should use android/log.h instead of cutils/log.h as a good example to all others. Adjust header order to comply with Android Coding standards. Test: Compile Bug: 26552300 Bug: 31289077 Change-Id: I2c9cbbbd64d8dccf2d44356361d9742e4a9b9031
* | Convert more Android.mk files to Android.bpDan Willemsen2016-07-132-33/+21
|/ | | | | | | These modules have their dependencies satisfied, and aren't doing anything strange. Change-Id: I72039a15256cbd5e5eee0d79a15d66d74a6c087d
* Adds a parameter to the wakeup_callback to report sucessful wakeup or ↵Ruchi Kandoi2015-06-252-11/+15
| | | | | | | | | | | 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 TEMP_FAILURE_RETRY to libsuspend.Jeff Brown2015-05-183-19/+16
| | | | | | | | | In testing, I observed one instance of a call failing due to a signal sent to the process. This could happen at various times so it's better to be safe than sorry. Bug: 20534809 Change-Id: I42242087300d8b840a50aec34aa6b2e1507cab50
* Libsuspend: Remove unused variableAndreas Gampe2014-11-241-1/+0
| | | | | | For build-system CFLAGS clean-up, remove unused variable. Change-Id: I34bd33fd24b02ee58b64029146c253c61651d45f
* am 1291df76: am c5fa4b19: am 065c2706: Merge "libsuspend: Turn on -Werror"Mark Salyzyn2014-05-221-0/+2
|\ | | | | | | | | * commit '1291df76956407d08e673443786f92c9a16006c1': libsuspend: Turn on -Werror
| * libsuspend: Turn on -WerrorMark Salyzyn2014-05-211-0/+2
| | | | | | | | Change-Id: I4ea982ab7d68a596ac79d93a01c05a109d24672d
* | am 43cb7ae6: am 4f362e43: am 835526fd: Merge "Cleanup: warning fixit."Sasha Levitskiy2014-04-121-6/+1
|\| | | | | | | | | * commit '43cb7ae6c31ced8cd518eab59dfea31ab1ade812': Cleanup: warning fixit.
| * Cleanup: warning fixit.Sasha Levitskiy2014-04-111-6/+1
| | | | | | | | | | | | | | bootable/recovery has a dependent commit: I9adb470b04e4301989d128c9c3097b21b4dea431 Change-Id: Icf23e659265d71d5226d527c2b40cfbc132320ee Signed-off-by: Sasha Levitskiy <sanek@google.com>
* | Add ability to have a callback when wakeups happen.Dianne Hackborn2014-03-072-0/+23
| | | | | | | | Change-Id: I02ff0e035bf8a97bd1a3b6b1699181fc3a137d79
* | libsuspend: use wakeup count interface for system suspendTodd Poynor2014-03-041-0/+3
|/ | | | | | | | Use the wakeup count interface for requesting suspend, instead of autosleep, to allow userspace to collect stats on suspend/resume activity. Change-Id: I44b5ef031b2bdc5b09c904fb2adbbe16370c2984
* am 76edb14f: am 2cc3527a: libsuspend: compile as a static libraryIliyan Malchev2012-12-061-1/+9
|\ | | | | | | | | * commit '76edb14f94069b11f36250390556d7c3c1853026': libsuspend: compile as a static library
| * libsuspend: compile as a static libraryIliyan Malchev2012-12-051-1/+9
| | | | | | | | | | | | | | | | | | Compile libsuspend as a static library as well, currently needed by the charger code in some cases. Related-to-bug: 7429504 Change-Id: I113017c2c855f915b77c76d8934b6e57c0bb532c Signed-off-by: Iliyan Malchev <malchev@google.com>
* | autosuspend_inited flag set even if initialization failsKyle Russell2012-11-201-2/+2
|/ | | | | | | | | | | | | | | | | Prevents possible SIGSEGV on second autosuspend_enable attempt when first intialization attempt fails. autosuspend_inited should only be set once autosuspend_ops has been assigned. Consider the first call to autosuspend_enable(). autosuspend_init() sets its inited flag to true, and attempts to set autosuspend_ops. If all the other autosuspend_*_init() attempts fail, autosuspend_init() returns -1, which autosuspend_enable() will return as a failure. A second call to autosuspend_enable() will check autosuspend_init() and see that autosuspend has already been initialized. It will attempt to access autosuspend_ops, which were not set in the first initialization attempt, causing a SIGSEGV. Change-Id: Ib2d3ee62fee4c3b6d0323e5b7f3709a23c6b923f
* libsuspend: force autosleep off during initColin Cross2012-09-211-0/+3
| | | | | | | | | | | | | | | If autosuspend_autosleep_init is called when autosleep is enabled, for example after a runtime restart with the screen off, the kernel autosleep state will be enabled, but autosuspend_enabled is false. Further calls to autosuspend_disable by the framework will not result in autosleep being disabled. Call autosuspend_autosleep_disable from autosuspend_autosleep_init to get the kernel state into a known state that matches the autosuspend_enabled flag. Bug: 7119416 Change-Id: I8611e4fd256838272aad4382c2340508805b0376
* am 67bdfa98: am d25b8502: Merge "Fix unused param warning"Stephen Hines2012-08-081-1/+1
|\ | | | | | | | | * commit '67bdfa9823dd954fdfaa01721da17d8252fc05d1': Fix unused param warning
| * Fix unused param warningEdwin Vane2012-08-021-1/+1
| | | | | | | | | | | | | | | | | | libsuspend had only a single warning in the clang build. Fixing it to make the build clean. Change-Id: Iaac5f9144b6e6cb122141c6416056c1b2c9aa98e Author: Edwin Vane <edwin.vane@intel.com> Reviewed-by: Kevin P Schoedel <kevin.p.schoedel@intel.com>
* | libsuspend: wait for earlysuspend transition to finishColin Cross2012-06-141-2/+40
| | | | | | | | | | | | | | | | | | Wait for the early suspend transition to finish to the point where surfaceflinger would previously have synchronized. This is important during screen on, to ensure the display early suspend handlers have completed before surfaceflinger unblanks. Change-Id: I91ac0253d9655c3f1ae3dd7f1a918c279568b23e
* | libsuspend: always unblock early suspendColin Cross2012-06-071-4/+80
|/ | | | | | | | | SurfaceFlinger and PowerManagerService manage their synchronization without the help of early suspend, and SurfaceFlinger no longer unblocks early suspend. Add a new thread when early suspend is detected that will immediately unblock early suspend. Change-Id: I87ef4984a2ab34cbbb3af8b7762236b9a92dc2ea
* libsuspend: create new library to handle triggering suspendColin Cross2012-05-077-0/+603
libsuspend provides functions autosuspend_enable() and autosuspend_disable() to trigger suspend on a variety of different kernels. Change-Id: I5dc28fb51532fa7c514330f1cfde7698d31d734c