Loading drivers/power/supply/qcom/smb1355-charger.c +12 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include <linux/power_supply.h> #include <linux/workqueue.h> #include <linux/pmic-voter.h> #include <linux/string.h> /* SMB1355 registers, different than mentioned in smb-reg.h */ Loading Loading @@ -120,6 +121,7 @@ #define MISC_CUST_SDCDC_ILIMIT_CFG_REG (MISC_BASE + 0xA1) #define LS_VALLEY_THRESH_PCT_BIT BIT(3) #define PCL_LIMIT_MASK GENMASK(1, 0) #define SNARL_BARK_BITE_WD_CFG_REG (MISC_BASE + 0x53) #define BITE_WDOG_DISABLE_CHARGING_CFG_BIT BIT(7) Loading Loading @@ -1029,6 +1031,16 @@ static int smb1355_init_hw(struct smb1355 *chip) return rc; } /* For SMB1354, set PCL to 8.6 A */ if (!strcmp(chip->name, "smb1354")) { rc = smb1355_masked_write(chip, MISC_CUST_SDCDC_ILIMIT_CFG_REG, PCL_LIMIT_MASK, PCL_LIMIT_MASK); if (rc < 0) { pr_err("Couldn't set PCL limit to 8.6A rc=%d\n", rc); return rc; } } rc = smb1355_tskin_sensor_config(chip); if (rc < 0) { pr_err("Couldn't configure tskin regs rc=%d\n", rc); Loading Loading
drivers/power/supply/qcom/smb1355-charger.c +12 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,7 @@ #include <linux/power_supply.h> #include <linux/workqueue.h> #include <linux/pmic-voter.h> #include <linux/string.h> /* SMB1355 registers, different than mentioned in smb-reg.h */ Loading Loading @@ -120,6 +121,7 @@ #define MISC_CUST_SDCDC_ILIMIT_CFG_REG (MISC_BASE + 0xA1) #define LS_VALLEY_THRESH_PCT_BIT BIT(3) #define PCL_LIMIT_MASK GENMASK(1, 0) #define SNARL_BARK_BITE_WD_CFG_REG (MISC_BASE + 0x53) #define BITE_WDOG_DISABLE_CHARGING_CFG_BIT BIT(7) Loading Loading @@ -1029,6 +1031,16 @@ static int smb1355_init_hw(struct smb1355 *chip) return rc; } /* For SMB1354, set PCL to 8.6 A */ if (!strcmp(chip->name, "smb1354")) { rc = smb1355_masked_write(chip, MISC_CUST_SDCDC_ILIMIT_CFG_REG, PCL_LIMIT_MASK, PCL_LIMIT_MASK); if (rc < 0) { pr_err("Couldn't set PCL limit to 8.6A rc=%d\n", rc); return rc; } } rc = smb1355_tskin_sensor_config(chip); if (rc < 0) { pr_err("Couldn't configure tskin regs rc=%d\n", rc); Loading