summaryrefslogtreecommitdiffstats
path: root/healthd
Commit message (Collapse)AuthorAgeFilesLines
* healthd: Add DASH charger typeSteve Kondik2016-07-281-0/+1
| | | | Change-Id: Ie1ca5018c465f6b2c15cbc00bdf3bb866d98ddef
* healthd: Check if battery device exists instead of charger drivers beforeRuchi Kandoi2016-07-101-7/+3
| | | | | | | | | | | setting fake properties. healthd used to check for registered charger drivers to determine if the device is an always-plugged device with no battery. This patch changes it to check for battery instead. Change-Id: Ie4ff5d3f21dc1a83a780a41eb0c929f66b86d631 Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
* healthd: Write to blink file to fix LEDTom Marshall2016-07-062-0/+28
| | | | | | | | | Many devices (such as bacon) require touching a blink file before changes to the LED are committed to hardware. Jira: CYAN-7689 Change-Id: Ia18a62134d196a636352bcd1af924c407c19d5b4
* healthd: Support new PD and USB Type C typesBenson Leung2016-07-011-0/+3
| | | | | | | | | | See the new types added here : https://chromium-review.googlesource.com/304660 Add support for these. Signed-off-by: Benson Leung <bleung@google.com> Change-Id: I12c51e0611692a763a7f1cda57c77ad83d7aa7ea
* healthd: Fix NO_CHARGER_LEDChristopher R. Palmer2016-04-151-2/+2
| | | | Change-Id: Iaae43e2a236318011b7aefb59250c19dd954521e
* healthd: Allow devices to opt-out of enabling charger LEDEthan Chen2016-04-142-0/+12
| | | | | | | * Not all devices will want to enable this, and it may also cause symbol conflicts with static HAL libraries. Change-Id: I0a2a082f9bf84b6ecfecf3de88c6d494d5e2cf44
* healthd: Rename default QCOM libhealthd libraryEthan Chen2016-04-141-2/+2
| | | | | | * Avoid possible module name conflicts Change-Id: I4a804a4d1e7266e8918b5a5b50adaffe219ff226
* healthd: use timerfd if dev alarm not existKeith Mok2016-02-231-2/+35
| | | | | | | | | /dev/alarm driver is deprecated is M. If it does not exists, use timerfd instead. SAMBAR-1286 Change-Id: Ie1eac58fddc80a8a545848c2a4f5db0e64eae076
* healthd: Reduce permissions needed for alarm trackingEthan Chen2016-02-171-1/+1
| | | | | | | * Write permission to /dev/rtc0 is not required. REF: CYNGNOS-2073 Change-Id: I322601a773ae61d985bf1fb50b605249be40948c
* healthd: Reboot to Android when off mode charger timer expiresChao Chen2016-02-171-1/+1
| | | | | | | * Device must reboot to Android to handle off mode alarms. REF: CYNGNOS-2073 Change-Id: Idf40031a0b31fc1b72c12a3f8770d07a5cb3d44b
* healthd: Separate power off alarm implementation into MSM specific HALChao Chen2016-02-174-25/+39
| | | | | | | | * Make the alarm implementation a separate HAL selected by BOARD_USES_QCOM_HARDWARE. REF: CYNGNOS-2073 Change-Id: I232c7999ebadff5c4e4e028c9cc2202441509fb7
* healthd: Support alarm in power off charging modeMatthew Qin2016-02-174-1/+239
| | | | | | | | To implement this feature need to let the phone reboot some time earlier than the alarm time. REF: CYNGNOS-2073 Change-Id: I6505a99b51932ffa23518769f8fd4d2590021543
* charger: Show all charger animationsJason Riordan2016-02-091-1/+1
| | | | | | | | With level-only set to true 80% battery animation is only shown when battery is exactly 80%. Set to false to allow all animation frames to be used. Change-Id: I7b53e924a661e644ad00ba9906e582d4a6bc2610
* Revert "charger_mode: Set font as 'log'"Diogo Ferreira2016-01-191-1/+0
| | | | | | | | | This reverts commit e406b65d73a4841afc4c0b619fe8e776f05937b0. Reverting since the font is not used by the default board file and can be easily customized through a custom one. Change-Id: Ic5c781796c7bcf87939410e6fc3d2f6043906356
* charger_mode: Set font as 'log'Diogo Ferreira2016-01-191-0/+1
| | | | | | | | The 'log' font is more pleasant and is density aware, which makes the battery percentage render using the correct size. Change-Id: I88adddb28a5d8956cfefac2173ed2620957553bc Ticket: CYNGNOS-1543
* Merge tag 'android-6.0.1_r3' of ↵Steve Kondik2015-12-072-1/+19
|\ | | | | | | | | | | | | | | https://android.googlesource.com/platform/system/core into HEAD Android 6.0.1 release 3 Change-Id: I8b65c0223e3444360432abd871a9d8f007831ba0
| * healthd: Adds fake battery properties for devices with no battery.Ruchi Kandoi2015-10-122-1/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Devices which have no battery and are always plugged in will not have any battery property initialized. This causes the 'stable power' to never be switched which is required for updating apps. This change recognizes such a device and manually sets the battery to 100% and charger status to connected to AC mains. It will also fake the battery temperature. Bug: 24258855 Change-Id: I98e5ed0dbeb7f2ab6d3802cd7e0f3a269bd8f31f Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
* | Revert "healthd: Support QC2.0 type charger"Chao Chen2015-12-021-1/+0
| | | | | | | | | | | | | | The change is duplicated. This reverts commit c2333e109087e1d50dcf6937bd67663cb195e020. Change-Id: I9cf3ca50a48ca22eafe3e12c0c00562ba2cb8645
* | Partially revert "healthd: allow custom charger"Ethan Chen2015-12-011-6/+1
| | | | | | | | | | | | | | | | | | | | | | * Don't allow custom charger code, prefer to use the existing STATIC_HAL_LIBS hook instead. * Continue to allow devices to replace charger resources, since it's just easier to deal with. This reverts commit 29f7779fdbccb5926a3f74d70c8721fa62e75a0c. Change-Id: I34289749c852dd92b7d07ddb3edeb3a1589a7330
* | healthd: Actually use correct common backlight functionEthan Chen2015-11-301-1/+1
| | | | | | | | Change-Id: I4f97007bf1c30626c943e163189a02a58f5c9e3d
* | healthd: Call common backlight functionEthan Chen2015-11-301-1/+1
| | | | | | | | Change-Id: I0cb5a3269cc47f1ddfd7e9e641fcc9405cb97872
* | Revert "healthd: charger: Add backlight control in charging animation"Ethan Chen2015-11-302-56/+0
| | | | | | | | | | | | This reverts commit 7cad6eeddc8ef7beb5852428fa1cb90677b30fa7. Change-Id: I026cba9e7558d8f0bf97ab784e5b31ee1ed61c6f
* | healthd: charger: Add backlight control in charging animationFenglin Wu2015-11-302-0/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some targets the FBIOBLANK does not control the backlight. Add the backlight control in charging animation to make sure the backlight will be turned on/off successfully. Change-Id: I3bba3b58daba6cffa4eb1314a6da1542f43e8e47 healthd: remove useless gotos in set_backlight_on Change-Id: Id2a254eade02a10da699a8293ae988e9ee53be80 Disable backlight when blanking panel. This used to be the behaviour up to and including cm-11.0 (see e.g. commit f7ce72ca), but in newer versions the backlight is only turned on and never off (see commit 1e961c04). Fix it. Change-Id: I6c3bf6abbb4e11dc010c360ecfe9f3bb3e2f3548 healthd: Add secondary backlight path support Some devices require two backlight brightness paths to turn off the screen. Change-Id: Ibf2ee853657c602158af219de0ba132f29dc4571 Change-Id: I3bba3b58daba6cffa4eb1314a6da1542f43e8e47
* | healthd: Turn screen off before rebootingPat Erley2015-11-301-0/+2
| | | | | | | | | | | | | | | | Some hardware doesn't like being rebooted with the panel on and active. This resolves panel corruption in some such cases. Change-Id: I7f00ee70a4ce2db9c362e319b844b798d7cb2910 (cherry picked from commit 4743d5cbad432f419477eda41f1afc421a47a1f8)
* | 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