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

Commit bc76024c authored by Mao Jinlong's avatar Mao Jinlong Committed by Ashay Jaiswal
Browse files

msm: qpnp-power-on : avoid overriding value of boot_reason



Currently boot_reason is overridden since the secondary PMIC PON devices
are specified and probed. Update the boot_reason only after reading
primary PMIC's PON reason status.

Change-Id: I02d97e9b2c2a88c36671359e282b6870fd936a71
Signed-off-by: default avatarMao Jinlong <c_jmao@codeaurora.org>
parent 989cbba1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1622,7 +1622,6 @@ static int qpnp_pon_probe(struct spmi_device *spmi)
		return rc;
	}

	boot_reason = ffs(pon_sts);

	index = ffs(pon_sts) - 1;
	cold_boot = !qpnp_pon_is_warm_reset();
@@ -1778,6 +1777,8 @@ static int qpnp_pon_probe(struct spmi_device *spmi)
		list_add(&pon->list, &spon_dev_list);
		mutex_unlock(&spon_list_mutex);
		pon->is_spon = true;
	} else {
		boot_reason = ffs(pon_sts);
	}

	/* config whether store the hard reset reason */