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

Commit dcbef2a1 authored by Tanya Finkel's avatar Tanya Finkel
Browse files

msm: qpnp-power-on: Store device shut down in PMIC register



Use the control register in PMIC power-on peripheral store device
in the shut down state. If an user initiates a shutdown from
user space by pressing the power key, (in the case of this particular flag)
ON means that the device will stay in shut down state instead of shut down
and boot device again.

Change-Id: I2198a37427a80c51fffcec47d9476892cdc662c5
Signed-off-by: default avatarTanya Finkel <tfinkel@codeaurora.org>
parent 0c3a23a4
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,pon-reset-off	Boolean property which if set will store the hardware
				power off in the system shut-down state, instead of reset state.
- qcom,warm-reset-poweroff-type		Poweroff type required to be configured on
					PS_HOLD reset control register when the system
					goes for warm reset. If this property is not
+9 −0
Original line number Diff line number Diff line
@@ -2251,6 +2251,15 @@ static int qpnp_pon_probe(struct spmi_device *spmi)
		return rc;
	}

	if (of_property_read_bool(spmi->dev.of_node,
					"qcom,pon-reset-off")) {
		rc = qpnp_pon_trigger_config(PON_CBLPWR_N, false);
		if (rc) {
			dev_err(&spmi->dev, "failed update the PON_CBLPWR %d\n",
				rc);
		}
	}

	if (of_property_read_bool(spmi->dev.of_node,
					"qcom,secondary-pon-reset")) {
		if (sys_reset) {