Skip to content

Commit

Permalink
healthd: Add support for BMS and WiPower.
Browse files Browse the repository at this point in the history
Battery node has no batteryFullChargePath and batteryCycleCountPath,
but battery management system does. Simply add it.

Also add support for QCOM WiPower chargers.

Change-Id: I5fbbebb01cbe7c38af1f0997a832c79fcf42a098
  • Loading branch information
codeworkx authored and adithya2306 committed Sep 14, 2020
1 parent be74567 commit c6f9508
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions healthd/BatteryMonitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ BatteryMonitor::PowerSupplyType BatteryMonitor::readPowerSupplyType(const String
static SysfsStringEnumMap<int> supplyTypeMap[] = {
{"Unknown", ANDROID_POWER_SUPPLY_TYPE_UNKNOWN},
{"Battery", ANDROID_POWER_SUPPLY_TYPE_BATTERY},
{"BMS", ANDROID_POWER_SUPPLY_TYPE_BATTERY},
{"UPS", ANDROID_POWER_SUPPLY_TYPE_AC},
{"Mains", ANDROID_POWER_SUPPLY_TYPE_AC},
{"USB", ANDROID_POWER_SUPPLY_TYPE_USB},
Expand All @@ -196,6 +197,7 @@ BatteryMonitor::PowerSupplyType BatteryMonitor::readPowerSupplyType(const String
{"USB_C", ANDROID_POWER_SUPPLY_TYPE_AC},
{"USB_PD", ANDROID_POWER_SUPPLY_TYPE_AC},
{"USB_PD_DRP", ANDROID_POWER_SUPPLY_TYPE_USB},
{"Wipower", ANDROID_POWER_SUPPLY_TYPE_WIRELESS},
{"Wireless", ANDROID_POWER_SUPPLY_TYPE_WIRELESS},
{NULL, 0},
};
Expand Down

0 comments on commit c6f9508

Please sign in to comment.