]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
power: supply: qcom_battmgr: add OOI chemistry
authorChristopher Ruehl <chris.ruehl@gtsys.com.hk>
Mon, 11 Aug 2025 15:22:09 +0000 (17:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Nov 2025 20:36:48 +0000 (15:36 -0500)
[ Upstream commit fee0904441325d83e7578ca457ec65a9d3f21264 ]

The ASUS S15 xElite model report the Li-ion battery with an OOI, hence this
update the detection and return the appropriate type.

Signed-off-by: Christopher Ruehl <chris.ruehl@gtsys.com.hk>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/power/supply/qcom_battmgr.c

index 99808ea9851f6ad96b31203762c13bf029d18661..fdb2d1b883fc58058f7497dd45d8a1641c388f9e 100644 (file)
@@ -982,7 +982,8 @@ static void qcom_battmgr_sc8280xp_strcpy(char *dest, const char *src)
 
 static unsigned int qcom_battmgr_sc8280xp_parse_technology(const char *chemistry)
 {
-       if (!strncmp(chemistry, "LIO", BATTMGR_CHEMISTRY_LEN))
+       if ((!strncmp(chemistry, "LIO", BATTMGR_CHEMISTRY_LEN)) ||
+           (!strncmp(chemistry, "OOI", BATTMGR_CHEMISTRY_LEN)))
                return POWER_SUPPLY_TECHNOLOGY_LION;
        if (!strncmp(chemistry, "LIP", BATTMGR_CHEMISTRY_LEN))
                return POWER_SUPPLY_TECHNOLOGY_LIPO;