Commit Graph

9 Commits

Author SHA1 Message Date
Mark Salyzyn 30f991f251 liblog: use log/log.h when utilizing ALOG macros
Test: compile
Bug: 30465923
Change-Id: Id6d76510819ebd88c3f5003d00d73a0dbe85e943
2017-01-11 09:31:15 -08:00
Tim Murray 20350c8418 libsuspend: move to exponential backoff am: fb896944b6
am: cf11830695

Change-Id: Ic3289a6cf433ee1c0c9b468ea8380493663ed84f
2016-10-12 18:20:51 +00:00
Tim Murray fb896944b6 libsuspend: move to exponential backoff
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
2016-10-11 14:51:34 -07:00
Mark Salyzyn 66ce3e08c5 system/core Replace cutils/log.h with android/log.h
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
2016-09-30 12:47:05 -07:00
Ruchi Kandoi d3027d85f3 Adds a parameter to the wakeup_callback to report sucessful wakeup or 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
2015-06-25 13:15:22 -07:00
Jeff Brown 0446e16f53 Add TEMP_FAILURE_RETRY to libsuspend.
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
2015-05-18 15:53:56 -07:00
Dianne Hackborn 9552cdf434 Add ability to have a callback when wakeups happen.
Change-Id: I02ff0e035bf8a97bd1a3b6b1699181fc3a137d79
2014-03-07 11:00:39 -08:00
Edwin Vane 62f9ffac1a Fix unused param warning
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>
2012-08-02 10:40:12 -04:00
Colin Cross a2582c2c4d libsuspend: create new library to handle triggering suspend
libsuspend provides functions autosuspend_enable() and
autosuspend_disable() to trigger suspend on a variety of different
kernels.

Change-Id: I5dc28fb51532fa7c514330f1cfde7698d31d734c
2012-05-07 15:33:34 -07:00