summaryrefslogtreecommitdiffstats
path: root/healthd
Commit message (Collapse)AuthorAgeFilesLines
* healthd: allow custom chargerScott Mertz2015-11-201-2/+12
| | | | | Change-Id: I1380bea300bfaa6819d50bdc813329c93050286a (cherry picked from commit b6ebd65cd36d06daa5cf33f031d7e03b0bd674c6)
* Merge tag 'android-6.0.0_r26' into cm-13.0Ricardo Cerqueira2015-11-051-2/+12
|\ | | | | | | | | | | Android 6.0.0 release 26 Change-Id: I93d1e3767cbacab2b18cff360065c91b9eaf1d96
| * healthd: logd: add timestamp to kernel logged battery messagesMark Salyzyn2015-08-271-5/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (cherry pick from commit acb1ddf56c98a75a49b263f99ef07ce361dc4323) Aid monotonic to realtime logging synchronization correction in the Android ecosystem by providing a periodic notification. We now have the following messages in the kernel logs: - PM: suspend entry %Y-%m-%d %H:%M:%S.%09q UTC - PM: suspend exit %Y-%m-%d %H:%M:%S.%09q UTC - Suspended for %s.%03q seconds - healthd: battery l=100 ... %Y-%m-%d %H:%M:%S.%09q UTC Alter klogd to resynchronize on healthd messages as well. NB: Time using strftime format, %q is a reference to fractional second as introduced into log_time strptime method. Bug: 21868540 Change-Id: I854afc0a07dff9c7f26d2b2f68990e52bf90e300
| * Show charging speed on KeyguardAdrian Roos2015-07-131-2/+12
| | | | | | | | | | Bug: 8099739 Change-Id: I2e5c21dd7ec028ce47fb03ab71e74f7fccaa9e36
* | healthd: logd: add timestamp to kernel logged battery messagesMark Salyzyn2015-11-011-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Aid monotonic to realtime logging synchronization correction in the Android ecosystem by providing a periodic notification. We now have the following messages in the kernel logs: - PM: suspend entry %Y-%m-%d %H:%M:%S.%09q UTC - PM: suspend exit %Y-%m-%d %H:%M:%S.%09q UTC - Suspended for %s.%03q seconds - healthd: battery l=100 ... %Y-%m-%d %H:%M:%S.%09q UTC Alter klogd to resynchronize on healthd messages as well. NB: Time using strftime format, %q is a reference to fractional second as introduced into log_time strptime method. Bug: 21868540 Change-Id: I854afc0a07dff9c7f26d2b2f68990e52bf90e300
* | healthd: Support QC2.0 type chargerChao Chen2015-11-011-0/+1
| | | | | | | | Change-Id: I838ef54ac358ac9ce851a93c47e87030b4219c1c
* | healthd: Stop logspamMichael Bestas2015-11-011-1/+1
| | | | | | | | Change-Id: Ib4a4cb226f61f3e2a4a7c59ca0e0bae47b468d6a
* | healthd: Disable the RTC wakeup timerSravan Kumar Ambapuram2015-11-011-0/+7
| | | | | | | | | | | | | | | | | | | | | | The timer is used here to avoid battery drained to zero. But the periodic wakeup during suspend should not be needed as MSM PMIC already support that by trigger interrupt to avoid the critical low battery situation. This will save more power. And if the design is not support HW interrupt of low battery, need to enable the timer to periodic check. Change-Id: I040b4bc8548dc59b5e7cacb9a5a8a3557604f458 Signed-off-by: arter97 <qkrwngud825@gmail.com>
* | healthd: fix LED color on 100%MarcKe2015-11-011-3/+6
| | | | | | | | | | | | | | if soc reaches 100, the loop variable would reach 3. acessing the the fourth element of soc_leds is undefined behaviour Change-Id: Iebc521c66844c811afa0244bc7977d1f88144227
* | healthd: more descriptive LED path opening error messageMarcKe2015-10-301-1/+1
| | | | | | | | Change-Id: I6e3fa9e34a471c387a62dfc3318fd94620a30cd7
* | healthd: remove useless goto in charger modeMarcKe2015-10-301-2/+1
| | | | | | | | | | | | | | jumping to the cleanup makes a check that will fail anyways, since fd is smaller than 0 Change-Id: Ic53f186e00fc09a49de5185b01a2bf64a8ceba35
* | Healthd: charger: allow override of LED/BACKLIGHT pathssbrissen2015-10-302-0/+18
| | | | | | | | Change-Id: Ib7372e441d554e16ffc20ce43993ee78cdc5b187
* | healthd: increase healthd fast timer to 10mins instead of 1minSravan Kumar Ambapuram2015-10-301-1/+1
| | | | | | | | | | | | | | healthd 1 min wakeups are causing significant power impact during static display use case. so increasing the timer to 10min. Change-Id: If7a514e4152789144242e198175918b6687c3bcf
* | Core: fix compile issue of healthd.`Shareef Ali2015-10-301-1/+1
| | | | | | | | | | | | fixes this in darwin cp: symlink: /sbin/healthd: File exists Change-Id: Ia0a51962ec6d1713ece1e9c1d4f9df479fee5f5b
* | charger: allow home button to wakePawit Pornkitprasan2015-10-301-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A squashed commit of the following: commit 6ce21d726a967b2cc942476758b9ab3851ff39f1 Author: Pawit Pornkitprasan <p.pawit@gmail.com> Date: Sun Feb 3 22:21:32 2013 +0700 charger: do not suspend when handling home When using Google's suspend implementation, home press should also wake the device from suspend Change-Id: I51f3e45c5cb418b0b3718e7223a1336876379043 commit 75a7cf84df719d8cf5cd77093b3f9fee3c09017e Author: Pawit Pornkitprasan <p.pawit@gmail.com> Date: Sat Jul 21 22:09:37 2012 +0700 charger: allow home button to wake On certain devices (e.g. galaxysmtd), the user expects the physical home button to be able to wake the device as well as the power button. Change-Id: If764f36aba3810dfa5233af8baf0a740b04889e0 Change-Id: I362b227e26bc864a2cad471df799bce2d682ecee
* | healthd: charger: Add tricolor led to indicate battery capacityFenglin Wu2015-10-301-0/+87
| | | | | | | | | | | | | | | | | | | | | | Add led to indicate battery capacity when doing off mode charging. The led behavior is design as below: i. Shows red led if capacity is lower than 15%. ii. Shows yellow (red + green) led if capacity is lower than 90% but higher than 15%. iii. Shows green led if capacity is higher than 90%. Change-Id: If637defec8a04e859b00a6492ec1f95d6bff2200
* | healthd: charger: Increase unplugged shutdown time to 5smyfluxi2015-10-251-1/+1
| | | | | | | | | | | | | | 1 second is a too short delay for some chargers such as hammerhead's. Increasing it a bit fixes off-mode charge. Change-Id: Ibcd2cf68b4f56fcfbcbf8a25ee4e18d1eab73037
* | Merge branch 'm' of git://codeaurora.org/platform/system/core into cm-13.0Steve Kondik2015-10-214-11/+68
|\ \
| * | healthd: charger: Add board overrides in mode_chargerChunmei Cai2015-10-074-11/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add following overrides in mode_charger to improve the off-mode charging user experience: 1. Draw battery information on the animation, such as: capacity; 2. Handle board specific battery status update; 3. Handle board specific mode charger initialization; 4. Turn on/off the backlight explicitely; 5. Reduce the unplugged shutdown delay to 1 seccond; 6. Do a period chorse and then heartbeat to reduce the animation boot time. Change-Id: Ic2b7ab6deeb52c4effe3b4af9b590950d5ee97f1
* | | healthd: dock batteryJorge Ruesga2015-10-196-8/+342
| | | | | | | | | | | | | | | | | | Change-Id: I2ad09e5e87d55c47af4d1efc14cc585cc08e2dce Require: topic:dock_battery Signed-off-by: Jorge Ruesga <jorge@ruesga.com>
* | | healthd: Detect power supply type for all charger devicesmyfluxi2015-10-191-7/+3
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Power supply type is not determined via the device name, hence iterate over all available devices in the subsystem node and read the type from device file. shell@hammerhead:/ $ ls /sys/class/power_supply ac batt_therm battery touch usb wireless <4>[ 3184.867782] healthd: touch: Unknown power supply type <4>[ 3184.868039] healthd: batt_therm: Unknown power supply type <6>[ 3184.880506] healthd: battery l=89 v=4181 t=25.5 h=2 st=2 c=-288 chg=u <4>[ 3184.890362] healthd: touch: Unknown power supply type <4>[ 3184.890549] healthd: batt_therm: Unknown power supply type <6>[ 3184.899419] healthd: battery l=89 v=4181 t=25.5 h=2 st=2 c=-59 chg=u <4>[ 3184.908756] healthd: touch: Unknown power supply type <4>[ 3184.908984] healthd: batt_therm: Unknown power supply type <6>[ 3184.919672] healthd: battery l=89 v=4181 t=25.6 h=2 st=2 c=-25 chg=u Change-Id: I863bfab95193899460237b51997e0418eeb4ee2c
* | healthd: Add support for HVDCP_3 chargersAbhijeet Dharmapurikar2015-10-061-0/+1
| | | | | | | | | | | | | | | | HVDCP_3 is a high voltage DCP charger where the charger's voltage can be changed by issuing pulses on the D+/D- lines. Add support to recognize it and treat it as an AC power source. Change-Id: Ib719529904e8b7a676bbdc5f5953f0f9da6df3fa
* | healthd: Add support for HVDCP and Wipower chargersAbhijeet Dharmapurikar2015-10-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | HVDCP charger is high voltage DCP chargers. Add support to recognize it and treat them as AC power source. Also, Wipower charging is a wireless charger where the power transfer is via resonance and power control messages are exchanged over BLE. Treat Wipower as a wireless charger. CRs-Fixed: 775241 Change-Id: Id49bc31111825721ffce5a71c29f79659c5fddf0
* | healthd: Reinitialize mChargerNames for every battery updateRamakrishnan Ganesh2015-10-061-25/+53
|/ | | | | | | | | | | | | | Booting up the device without usb, the kernel sets the usb power supply type as UNKNOWN. The type of usb power supply changes at run-time as various chargers are plugged in/out. However, healthd initilizes the charger list only at bootup. Change it such that it checks for charger type changes with every battery or usb uevent. While at it, the kernel may have a power supply type which is not known to healthd. This is perfectly fine. Update healthd to not print a warning. Change-Id: I2ec9f9a420ca61814d43c316b418ce94de3691bc
* resolved conflicts for merge of 6e9b28b2 to masterElliott Hughes2015-04-151-4/+4
|\ | | | | | | Change-Id: Icd1bbc33283c504691934256a4cf5989868d3caf
| * Move away from gr_surface.Elliott Hughes2015-04-151-4/+4
| | | | | | | | Change-Id: Icfa81b18e5c99e3ffc5c55aba1d435eb26eb8680
* | Fix print format mismatch in 64-bit mode.Chih-Hung Hsieh2015-02-241-1/+1
| | | | | | | | Change-Id: I7f0b0ed87e4e544517be66418ff76596a084976f
* | am 0e0fbdd1: am 492dd1e5: Merge "Remove obsolete BUILD_TINY_ANDROID check ↵Elliott Hughes2015-01-241-4/+0
|\ \ | |/ | | | | | | | | | | from healthd makefile" * commit '0e0fbdd1fcef71e653ad2d988649f6259b304fc2': Remove obsolete BUILD_TINY_ANDROID check from healthd makefile
| * am 492dd1e5: Merge "Remove obsolete BUILD_TINY_ANDROID check from healthd ↵Elliott Hughes2015-01-241-4/+0
| |\ | | | | | | | | | | | | | | | | | | makefile" * commit '492dd1e5c1c47bc8a804b58bed941c8eaa94d9a3': Remove obsolete BUILD_TINY_ANDROID check from healthd makefile
| | * Remove obsolete BUILD_TINY_ANDROID check from healthd makefileTrevor Drake2015-01-241-4/+0
| | | | | | | | | | | | Change-Id: I7e23236e7725891d07368dd8ea8d667014d7dc78
* | | am 38c3386a: resolved conflicts for merge of 03be4928 to lmp-mr1-dev-plus-aospAndreas Gampe2014-11-253-8/+0
|\ \ \ | |/ / | | | | | | | | | * commit '38c3386a6cd44789f540fb9700c284345e7269e3': Healthd: Remove unused variables
| * | resolved conflicts for merge of 03be4928 to lmp-mr1-dev-plus-aospAndreas Gampe2014-11-253-8/+0
| |\ \ | | |/ | | | | | | Change-Id: I7c72ed2c54ceae19c9dfe8b2e1707f869faad110
| | * Healthd: Remove unused variablesAndreas Gampe2014-11-243-8/+0
| | | | | | | | | | | | | | | | | | For build-system CFLAGS clean-up, remove unused variables. Change-Id: Ifc5884518bfdb744ea9823b98db544dbe59c20d2
| * | am e11d81b3: Merge "Update calls to IInterface::asBinder()"Marco Nelissen2014-11-171-5/+5
| |\ \ | | |/ | | | | | | | | | * commit 'e11d81b37c119ec3d67c1fe60779d510d21e6a14': Update calls to IInterface::asBinder()
| | * Update calls to IInterface::asBinder()Marco Nelissen2014-11-171-5/+5
| | | | | | | | | | | | | | | | | | to use the new static version. Change-Id: Ia7b10eb38ca55b72278bfd33d3bf647f338b4e6a
* | | Update calls to IInterface::asBinder()Marco Nelissen2014-11-141-5/+5
| | | | | | | | | | | | | | | | | | to use the new static version. Change-Id: Idcf82bb8c0b4b141475abb5330b08409dc14a600
* | | Charger: Improve screen on/off scenariosRuchi Kandoi2014-10-221-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In charger-mode, power off/on screen as required, for efficient charging. Turn on screen on power-key press rather than on key-release. On charge-cable removal, kick animation to show the correct battery level. Change-Id: I74eaf8681466c44dbd76a820adf154053e0fc43a Signed-off-by: Pavan Kumar S <pavan.kumar.s@intel.com> Signed-off-by: Jenny TC <jenny.tc@intel.com> Signed-off-by: Yong Yao <yong.yao@intel.com>
* | | Charger: Add a Charger to Android transition thresholdRuchi Kandoi2014-10-223-2/+11
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Existing code allows charger-mode to exit to Android even with 0% battery. This might lead to more battery discharge while booting to Android, especially if only USB-charger is connected, and thus certain features/components not functioning as expected in Android. This patch adds a configurable parameter to improve the user experience by preventing the charger exit till battery capacity is good enough to boot Android Change-Id: I56a283243551373e962ac562f25eaf11f07666c3 Signed-off-by: Pavan Kumar S <pavan.kumar.s@intel.com> Signed-off-by: Jenny TC <jenny.tc@intel.com> Signed-off-by: Yong Yao <yong.yao@intel.com>
* | healthd: Add callback for screen_on to the healthdHALRuchi Kandoi2014-09-263-26/+22
| | | | | | | | | | | | | | | | Adds a callback to the healthdHAL which can check for device specific properties to decide if the screen should turn on. Change-Id: I543e7729ecb291157df4d3be1bd718f8af01ac40 Signed-off-by: Ruchi Kandoi<kandoiruchi@google.com>
* | am 301a907f: Merge "healthd: charger: Run animation even if capacity is 0" ↵Ruchi Kandoi2014-09-241-1/+1
|\ \ | |/ | | | | | | | | | | into lmp-dev * commit '301a907f28570ff1627e30a37069e6c5ab6a4b75': healthd: charger: Run animation even if capacity is 0
| * healthd: charger: Run animation even if capacity is 0Devin Kim2014-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | If charger is connected and battery capacity is 0, charging animation should run. The device would be booted up even if capacity is 0 in off-mode charging. At that time, it would take some time to be 1 from 0 for capacity if you use USB charger. Bug: 17606689 Change-Id: I37e0f1b6ab0ee1f6d833882e169bf3ea06cf2399
* | healthd: use warning level for info logsTodd Poynor2014-09-232-20/+20
|/ | | | | | | To allow healthd/charger info to appear in systems where the loglevel has been bumped to squelch chatty drivers. Change-Id: I4ab135765700d7584a1ce5d972ea473d77f299f8
* healthd: charger: fix check for charger connected to enter suspendTodd Poynor2014-08-181-1/+1
| | | | | | | | | | Logic for this check was inadvertently reversed when porting this from the charger daemon to healthd. Request suspend if a charegr is connected, else stay out of suspend waiting for a charger connect or power off if none. Bug: 17112463 Change-Id: Iffdb6dbcd0d0a2a614ff8f50bf5f2e22e1ad552f
* healthd: Reports arbitrary numbers for capacity and temperature whenRuchi Kandoi2014-07-111-5/+7
| | | | | | | | | connected to fake battery. Detects if the device is attached to a fake battery if yes, healthd reports 42% battery charge and 42.2 degrees temperature. Change-Id: I2508fd91c8d3848ea64f57ab59d20be1c2817913
* healthd: fix 64-bit buildColin Cross2014-07-011-1/+1
| | | | | | int64_t needs to be printed with PRId64 Change-Id: If59b60bac71856e4266d459d159a570961e7340a
* charger: leave screen off when entered with very low batteryTodd Poynor2014-06-301-7/+23
| | | | Change-Id: I28e3d6adaf4bb59d14eca7103d7b063d54a41c75
* resolved conflicts for merge of 079c637f to masterRiley Andrews2014-06-231-2/+12
|\ | | | | | | Change-Id: Iab9a857026de954d7497d6b0eaf3751d2d3904c7
| * healthd: UEVENT_MSG_LEN is changed from 1048 to 2048 in compliance withRuchi Kandoi2014-06-191-1/+1
| | | | | | | | | | | | | | BUFFER_LEN in the kobject_uevent in kernel. Change-Id: Ia9f4b520847d40fe4e032875dfb79bd063bc723d Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
* | healthd: Avoid animation while not charging.Ruchi Kandoi2014-06-231-13/+22
| | | | | | | | | | | | | | | | | | At present, charging animation runs irrespective of whether charger is connected or not. When the charger is disconnected, device does not shutdown for 10sec. Charger animation during this period should be avoided. Change-Id: I34dc5028522ca199d50a1a1b684b035b2d81ef68
* | resolved conflicts for merge of de7bdc94 to masterRuchi Kandoi2014-06-201-1/+1
| | | | | | | | Change-Id: I6dc10c8220c0984b31a05534b576ca25afdf5383