Skip to content

Commit c655f45

Browse files
valpackettsre
authored andcommitted
power: supply: qcom_battmgr: Recognize "LiP" as lithium-polymer
On the Dell Latitude 7455, the firmware uses "LiP" with a lowercase 'i' for the battery chemistry type, but only all-uppercase "LIP" was being recognized. Add the CamelCase variant to the check to fix the "Unknown battery technology" warning. Fixes: 202ac22 ("power: supply: qcom_battmgr: Add lithium-polymer entry") Signed-off-by: Val Packett <val@packett.cool> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://patch.msgid.link/20260120235831.479038-1-val@packett.cool Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
1 parent 3db3747 commit c655f45

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/power/supply/qcom_battmgr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,8 @@ static unsigned int qcom_battmgr_sc8280xp_parse_technology(const char *chemistry
12401240
if ((!strncmp(chemistry, "LIO", BATTMGR_CHEMISTRY_LEN)) ||
12411241
(!strncmp(chemistry, "OOI", BATTMGR_CHEMISTRY_LEN)))
12421242
return POWER_SUPPLY_TECHNOLOGY_LION;
1243-
if (!strncmp(chemistry, "LIP", BATTMGR_CHEMISTRY_LEN))
1243+
if (!strncmp(chemistry, "LIP", BATTMGR_CHEMISTRY_LEN) ||
1244+
!strncmp(chemistry, "LiP", BATTMGR_CHEMISTRY_LEN))
12441245
return POWER_SUPPLY_TECHNOLOGY_LIPO;
12451246

12461247
pr_err("Unknown battery technology '%s'\n", chemistry);

0 commit comments

Comments
 (0)