Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b3327c8b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "power: smb1360: Fix the delta_soc calculation"

parents 3eb41068 b4587465
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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) {