Commit graph

14 commits

Author SHA1 Message Date
Todd Poynor
c15e993467 healthd: remove/rearrange extra battery property handling
Change-Id: I6cc1570e23c1c1468f08579f633997e95327347a
2013-10-22 18:21:27 -07:00
Todd Poynor
020369d872 healthd: BatteryService dumpstate support
Change-Id: Ia6938b7126751801310632c995af0f96e41f5f64
2013-10-22 16:32:54 -07:00
Todd Poynor
6dcc45ed6d healthd: Fixups for systems without batteries or removable batteries
* Replace unnecessary warnings about missing attributes with a more
  informative message when no battery devices provided by the system.

* Turn off periodic battery checks when no battery devices (thereby
  reducing unnecessary kernel log spam).

* Replace battery properties in log messages with a more informative
  message when no battery is provided or the battery is removed.

Change-Id: I68a514aa7315ae2b5d22cb8861d3c9b1b38035a1
2013-10-22 11:15:50 -07:00
Todd Poynor
2e227fbc5a healthd: start switchover to BatteryExtraProperties
Change-Id: I47a24d4284f502858ee929b2cda8881165ef4ef3
2013-09-30 15:36:44 -07:00
Todd Poynor
c7464c9150 healthd: move Android communication code to separate source
* add ops for different "modes" of healthd operation: android vs. recovery
* recovery mode selected by runstring options -r
* binder/Android communication moved to android mode
* recovery mode ops avoiding binder service registration
* "no service manager" flag removed; now handled by android vs. other modes

Change-Id: I3d8c89bf96a18a6a00cc85306f9a07d3f408f2a0
2013-09-17 14:41:07 -07:00
Todd Poynor
7b27f27d3d healthd: break link between BatteryMonitor and BatteryPropertiesRegistrar
Make it easier to later separate out binder-related code.

Add helper functions healthd_battery_update(), healthd_get_property() to
allow these operations without needing references to the BatteryMonitor
object.

Change-Id: Ie584bf53e5178ce0a098d0d940d6c311fdff62d4
2013-09-17 11:18:36 -07:00
Todd Poynor
bc10211184 healthd: Add average current property
Change-Id: Ibc901fe1b550c0d72095ef5590e2db8962d1a7b2
2013-09-04 17:41:57 -07:00
Todd Poynor
c133b7198a healthd: read individual battery property value on demand
Adding support for batteryChargeCounter and batteryCurrentNow as parameters
likely to be useful for power consumption analysis.

Change-Id: Ib23b05d3c31c22ece0d21e55cc481c1b5dabe59e
2013-08-22 02:00:26 +00:00
Todd Poynor
f5d3012d2c healthd: Move power_supply attribute paths to healthd_config
Allow health HAL to select specific paths to be used, overriding
default search for arbitrary power supplies with the named paths.

Change-Id: I5f724739f58ef56087ab592b7403fc083db8f173
2013-08-14 02:27:54 +00:00
Todd Poynor
a41611f638 healthd: fix botched logging call
Change-Id: Ibf5e28c657e0d9d193b266acd7b2912bebc3e71f
2013-08-12 12:18:36 -07:00
Todd Poynor
57fd0989cb healthd: preserve uA and uAh units for current_now and charge_counter
Change-Id: I20b3f47c541c4321b0593e504090ad6573b9cb01
2013-08-09 21:52:25 +00:00
Todd Poynor
10b235e743 healthd: add health HAL support
Adds board-specific battery monitoring capabilities:

* processing of battery property values and additional charging logic.
* adjusted (or removed) polling intervals.
* replaced (or removed) battery status heartbeat in kernel log.

Change-Id: Ia77bca8dc92c6c2a51afa65d516cacca08da73ac
2013-08-07 18:57:37 -07:00
Todd Poynor
b45f1f5bd0 healthd: add optional current_now and charge_counter to tracked state
uA and uAh units are converted to mA and mAh.

If current_now is present, add it to the heartbeat log (c=nnn).

Change-Id: I2b5fe7b4505c98ca2d11c3f94564c1c38493c8b9
2013-08-07 18:34:34 +00:00
Todd Poynor
752faf2c18 healthd: Add system health monitoring daemon
Initially moving battery health monitoring here.

Command line flag -n tells healthd not to use (or wait for) servicemanager
in this execution, for charger and recovery modes.

Change-Id: I1720594724af0c068497b359f9c6ad65aeaa1519
2013-07-26 01:30:42 +00:00