google_battery: add CSI Dock Watt standard
Bug: 254176148
Signed-off-by: Jenny Ho <[email protected]>
Change-Id: Ic88e5a95b0d8c9217fa5a0b30e923e7c51a3dc57
diff --git a/google_battery.c b/google_battery.c
index 1628e39..eb094bd 100644
--- a/google_battery.c
+++ b/google_battery.c
@@ -2353,8 +2353,8 @@
*/
static bool batt_csi_check_ad_power(const union gbms_ce_adapter_details *ad)
{
- const int ad_mw = (ad->ad_voltage * ad->ad_amperage) * 10000;
- int limit_mw = 9000 * 2000; /* 18 Watts: it changes with the device */
+ const unsigned int ad_mw = (ad->ad_voltage * ad->ad_amperage) * 10000;
+ unsigned int limit_mw = 9000 * 2000; /* 18 Watts: it changes with the device */
switch (ad->ad_type) {
case CHG_EV_ADAPTER_TYPE_USB:
@@ -2374,6 +2374,12 @@
case CHG_EV_ADAPTER_TYPE_WLC_SPP:
limit_mw = 7500000;
break;
+ case CHG_EV_ADAPTER_TYPE_EXT:
+ case CHG_EV_ADAPTER_TYPE_EXT1:
+ case CHG_EV_ADAPTER_TYPE_EXT2:
+ case CHG_EV_ADAPTER_TYPE_EXT_UNKNOWN:
+ limit_mw = 10500 * 1250;
+ break;
default:
break;
}