diff options
Diffstat (limited to 'drivers/power/supply/qcom_battmgr.c')
-rw-r--r-- | drivers/power/supply/qcom_battmgr.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/power/supply/qcom_battmgr.c b/drivers/power/supply/qcom_battmgr.c index 47d29271ddf4..2d50830610e9 100644 --- a/drivers/power/supply/qcom_battmgr.c +++ b/drivers/power/supply/qcom_battmgr.c @@ -8,6 +8,7 @@ #include <linux/mutex.h> #include <linux/of_device.h> #include <linux/power_supply.h> +#include <linux/property.h> #include <linux/soc/qcom/pdr.h> #include <linux/soc/qcom/pmic_glink.h> #include <linux/math.h> @@ -980,6 +981,8 @@ static unsigned int qcom_battmgr_sc8280xp_parse_technology(const char *chemistry { if (!strncmp(chemistry, "LIO", BATTMGR_CHEMISTRY_LEN)) return POWER_SUPPLY_TECHNOLOGY_LION; + if (!strncmp(chemistry, "LIP", BATTMGR_CHEMISTRY_LEN)) + return POWER_SUPPLY_TECHNOLOGY_LIPO; pr_err("Unknown battery technology '%s'\n", chemistry); return POWER_SUPPLY_TECHNOLOGY_UNKNOWN; @@ -1336,10 +1339,10 @@ static int qcom_battmgr_probe(struct auxiliary_device *adev, battmgr->dev = dev; psy_cfg.drv_data = battmgr; - psy_cfg.of_node = adev->dev.of_node; + psy_cfg.fwnode = dev_fwnode(&adev->dev); psy_cfg_supply.drv_data = battmgr; - psy_cfg_supply.of_node = adev->dev.of_node; + psy_cfg_supply.fwnode = dev_fwnode(&adev->dev); psy_cfg_supply.supplied_to = qcom_battmgr_battery; psy_cfg_supply.num_supplicants = 1; |