bms: update power_supply enums
rename POWER_SUPPLY_CHARGE_TYPE to POWER_SUPPLY_CHARGE_TYPE_EXT
rename POWER_SUPPLY_TYPE_WIRELESS to POWER_SUPPLY_TYPE_WIRELESS_EXT
Bug: 168244640
Signed-off-by: Wasb Liu <[email protected]>
Change-Id: Ie71706e9fc270801cfa08d4f7774ce9651e15194
diff --git a/google_battery.c b/google_battery.c
index 0032ca3..c29e8d8 100644
--- a/google_battery.c
+++ b/google_battery.c
@@ -1575,7 +1575,7 @@
pr_info("MSC_PRE vt=%d vb=%d fv_uv=%d chg_type=%d\n",
vtier, vbatt, *fv_uv, chg_type);
- } else if (chg_type != POWER_SUPPLY_CHARGE_TYPE_TAPER) {
+ } else if (chg_type != POWER_SUPPLY_CHARGE_TYPE_TAPER_EXT) {
/*
* Not fast, taper or precharge: in *_UNKNOWN and *_NONE
* set checked_cv_cnt=0 and check current to avoid early
@@ -1764,7 +1764,7 @@
if (chg_type == POWER_SUPPLY_CHARGE_TYPE_FAST) {
msc_state = MSC_FAST;
- } else if (chg_type != POWER_SUPPLY_CHARGE_TYPE_TAPER) {
+ } else if (chg_type != POWER_SUPPLY_CHARGE_TYPE_TAPER_EXT) {
msc_state = MSC_TYPE;
} else {
msc_state = MSC_LAST;
diff --git a/google_bms.c b/google_bms.c
index 2eeddd7..61c438f 100644
--- a/google_bms.c
+++ b/google_bms.c
@@ -366,7 +366,7 @@
}
if (chg_type == POWER_SUPPLY_CHARGE_TYPE_FAST)
flags |= GBMS_CS_FLAG_CC;
- if (chg_type == POWER_SUPPLY_CHARGE_TYPE_TAPER)
+ if (chg_type == POWER_SUPPLY_CHARGE_TYPE_TAPER_EXT)
flags |= GBMS_CS_FLAG_CV;
return flags;
diff --git a/max77729_charger.c b/max77729_charger.c
index 78438f0..ee11a18 100644
--- a/max77729_charger.c
+++ b/max77729_charger.c
@@ -740,11 +740,11 @@
*type = POWER_SUPPLY_CHARGE_TYPE_FAST;
break;
case CHGR_DTLS_FAST_CHARGE_CONST_VOLTAGE_MODE:
- *type = POWER_SUPPLY_CHARGE_TYPE_TAPER;
+ *type = POWER_SUPPLY_CHARGE_TYPE_TAPER_EXT;
break;
/* This is really DONE, */
case CHGR_DTLS_TOP_OFF_MODE:
- *type = POWER_SUPPLY_CHARGE_TYPE_TAPER;
+ *type = POWER_SUPPLY_CHARGE_TYPE_TAPER_EXT;
break;
case CHGR_DTLS_DONE_MODE:
*type = POWER_SUPPLY_CHARGE_TYPE_NONE;
diff --git a/max77759_charger.c b/max77759_charger.c
index 84be1e2..f37fb14 100644
--- a/max77759_charger.c
+++ b/max77759_charger.c
@@ -1373,7 +1373,7 @@
static const struct power_supply_desc max77759_wcin_psy_desc = {
.name = "dc",
- .type = POWER_SUPPLY_TYPE_WIRELESS,
+ .type = POWER_SUPPLY_TYPE_WIRELESS_EXT,
.properties = max77759_wcin_props,
.num_properties = ARRAY_SIZE(max77759_wcin_props),
.get_property = max77759_wcin_get_prop,
@@ -1451,7 +1451,7 @@
return POWER_SUPPLY_CHARGE_TYPE_FAST;
case CHGR_DTLS_FAST_CHARGE_CONST_VOLTAGE_MODE:
case CHGR_DTLS_TOP_OFF_MODE:
- return POWER_SUPPLY_CHARGE_TYPE_TAPER;
+ return POWER_SUPPLY_CHARGE_TYPE_TAPER_EXT;
case CHGR_DTLS_DONE_MODE:
case CHGR_DTLS_TIMER_FAULT_MODE:
diff --git a/p9221_charger.c b/p9221_charger.c
index 569f975..246e9d8 100644
--- a/p9221_charger.c
+++ b/p9221_charger.c
@@ -3888,7 +3888,7 @@
static const struct power_supply_desc p9221_psy_desc = {
.name = "wireless",
- .type = POWER_SUPPLY_TYPE_WIRELESS,
+ .type = POWER_SUPPLY_TYPE_WIRELESS_EXT,
.properties = p9221_props,
.num_properties = ARRAY_SIZE(p9221_props),
.get_property = p9221_get_property,
diff --git a/pca9468_charger.c b/pca9468_charger.c
index 2a1dd91..ba25e43 100644
--- a/pca9468_charger.c
+++ b/pca9468_charger.c
@@ -3861,7 +3861,7 @@
/*
* TODO: determine if we need to use the wireless power supply
- * if (pro_val.intval == POWER_SUPPLY_TYPE_WIRELESS) {
+ * if (pro_val.intval == POWER_SUPPLY_TYPE_WIRELESS_EXT) {
* pca9468->ta_type = TA_TYPE_WIRELESS;
* pr_info("%s: The current power supply type is WC,
* ta_type=%d\n", __func__, pca9468->ta_type);
@@ -4624,7 +4624,7 @@
return POWER_SUPPLY_CHARGE_TYPE_FAST;
case DC_STATE_START_CV:
case DC_STATE_CV_MODE:
- return POWER_SUPPLY_CHARGE_TYPE_TAPER;
+ return POWER_SUPPLY_CHARGE_TYPE_TAPER_EXT;
case DC_STATE_CHARGING_DONE:
break;
}