summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiHsiang Peng <yihsiangpeng@google.com>2023-12-20 07:48:44 +0000
committerYiHsiang Peng <yihsiangpeng@google.com>2023-12-20 07:51:19 +0000
commit6ffe2304e8f7e3eaad53a09d3067976a0bb49462 (patch)
tree8404649b1fd4d4339d279a29e82246a74ba8b5df
parenta41bfb63c0c84585a44dba2f37672eb0f788acb6 (diff)
downloadbms-android-gs-shusky-5.15-android14-qpr2-beta.tar.gz
use wlc_present due to wlc_online report 1 during wlc_spoof Bug: 316282178 Change-Id: I78b3991bdc03d394995e150e59a0e452e3889fe1 Signed-off-by: YiHsiang Peng <yihsiangpeng@google.com>
-rw-r--r--google_charger.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/google_charger.c b/google_charger.c
index c9310de..1b85b05 100644
--- a/google_charger.c
+++ b/google_charger.c
@@ -4792,7 +4792,8 @@ static int chg_therm_set_wlc_online(struct chg_drv *chg_drv)
if (!wlc_psy)
return PPS_PSY_OFFLINE;
- ret = power_supply_get_property(wlc_psy, POWER_SUPPLY_PROP_ONLINE, &pval);
+ /* use wlc_present due to wlc_online report 1 during wlc_spoof */
+ ret = power_supply_get_property(wlc_psy, POWER_SUPPLY_PROP_PRESENT, &pval);
if (ret < 0 || pval.intval == PPS_PSY_OFFLINE) {
int dc_icl;