From ce287da8c3c49474c4ddfbda5a38805f4ac031a8 Mon Sep 17 00:00:00 2001 From: xuwei9 Date: Tue, 11 Jul 2023 16:54:25 +0800 Subject: [PATCH] Cw2217:kernel 5.15 compatible compile change CW2217 kernel 5.15 compatible compile change Change-Id: I6190b193fbcc159308a1bc91dbd689f28b3829a9 Signed-off-by: xuwei9 Reviewed-on: https://gerrit.mot.com/2672112 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Xiangpo Zhao Submit-Approved: Jira Key --- drivers/power/cw2217b_fg_mmi/cw2217B_fuel_gauge_base.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/power/cw2217b_fg_mmi/cw2217B_fuel_gauge_base.c b/drivers/power/cw2217b_fg_mmi/cw2217B_fuel_gauge_base.c index 50af28eb7807..6a6588a92c3b 100644 --- a/drivers/power/cw2217b_fg_mmi/cw2217B_fuel_gauge_base.c +++ b/drivers/power/cw2217b_fg_mmi/cw2217B_fuel_gauge_base.c @@ -14,6 +14,7 @@ #include #include #include +#include #define CWFG_ENABLE_LOG 1 /* CHANGE Customer need to change this for enable/disable log */ @@ -511,7 +512,7 @@ static int cw_get_capacity(struct cw_battery *cw_bat) if (usb_online.intval && (cw_bat->ui_soc == 100) && (ui_soc < cw_bat->ui_soc) && (cw_bat->batt_status != POWER_SUPPLY_STATUS_DISCHARGING)) { - cw_printk("CW2015[%d]: usb online = %d, ui_soc_reg = %d", __LINE__, usb_online.intval, ui_soc); + cw_printk("CW2015[%d]: usb online = %d, ui_soc_reg = %d, remainder:%d", __LINE__, usb_online.intval, ui_soc, remainder); ui_soc = 100; } @@ -1097,6 +1098,10 @@ static int cw_battery_set_property(struct power_supply *psy, break; } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,15,0) + cw_info("%s, cw ntc_exist:%d\n", __func__, cw_bat->ntc_exist); +#endif + return ret; }