Loading drivers/power/smb1360-charger-fg.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -3032,7 +3032,7 @@ disable_fg_reset: */ */ if (!(chip->workaround_flags & WRKRND_FG_CONFIG_FAIL)) { if (!(chip->workaround_flags & WRKRND_FG_CONFIG_FAIL)) { if (chip->delta_soc != -EINVAL) { if (chip->delta_soc != -EINVAL) { reg = DIV_ROUND_UP(chip->delta_soc * MAX_8_BITS, 100); reg = abs(((chip->delta_soc * MAX_8_BITS) / 100) - 1); pr_debug("delta_soc=%d reg=%x\n", chip->delta_soc, reg); pr_debug("delta_soc=%d reg=%x\n", chip->delta_soc, reg); rc = smb1360_write(chip, SOC_DELTA_REG, reg); rc = smb1360_write(chip, SOC_DELTA_REG, reg); if (rc) { if (rc) { Loading Loading
drivers/power/smb1360-charger-fg.c +1 −1 Original line number Original line Diff line number Diff line Loading @@ -3032,7 +3032,7 @@ disable_fg_reset: */ */ if (!(chip->workaround_flags & WRKRND_FG_CONFIG_FAIL)) { if (!(chip->workaround_flags & WRKRND_FG_CONFIG_FAIL)) { if (chip->delta_soc != -EINVAL) { if (chip->delta_soc != -EINVAL) { reg = DIV_ROUND_UP(chip->delta_soc * MAX_8_BITS, 100); reg = abs(((chip->delta_soc * MAX_8_BITS) / 100) - 1); pr_debug("delta_soc=%d reg=%x\n", chip->delta_soc, reg); pr_debug("delta_soc=%d reg=%x\n", chip->delta_soc, reg); rc = smb1360_write(chip, SOC_DELTA_REG, reg); rc = smb1360_write(chip, SOC_DELTA_REG, reg); if (rc) { if (rc) { Loading