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

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

Merge "msm: qpnp-power-on: update PMIC reset configuration logic"

parents d19eac45 8b8bee79
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -59,6 +59,8 @@ Optional properties:
- qcom,store-hard-reset-reason	Boolean property which if set will store the hardware
				reset reason to SOFT_RB_SPARE register of the core PMIC
				PON peripheral.
- qcom,cfg-shutdown-for-hard-reset	Boolean property, if present PMIC's PS_HOLD reset type
					is configured for SHUTDOWN in case of HARD RESET.


All the below properties are in the sub-node section (properties of the child
+9 −0
Original line number Diff line number Diff line
@@ -392,6 +392,15 @@ static int qpnp_pon_reset_config(struct qpnp_pon *pon,
	 */
	udelay(500);

	/*
	 * In case of HARD RESET configure PMIC's
	 * PS_HOLD_RESET_CTL based on the dt property.
	 */
	if ((type == PON_POWER_OFF_HARD_RESET) &&
			of_find_property(pon->spmi->dev.of_node,
				"qcom,cfg-shutdown-for-hard-reset", NULL))
		type = PON_POWER_OFF_SHUTDOWN;

	rc = qpnp_pon_masked_write(pon, QPNP_PON_PS_HOLD_RST_CTL(pon->base),
				   QPNP_PON_POWER_OFF_MASK, type);
	if (rc)