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

Commit 18193e7c 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: Hold wakeup event for power key event"

parents bc387ed2 e76db2bf
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -157,6 +157,9 @@

#define QPNP_POFF_REASON_UVLO			13

/* Wakeup event timeout */
#define WAKEUP_TIMEOUT_MSEC			3000

enum qpnp_pon_version {
	QPNP_PON_GEN1_V1,
	QPNP_PON_GEN1_V2,
@@ -777,6 +780,9 @@ qpnp_pon_input_dispatch(struct qpnp_pon *pon, u32 pon_type)
	if (!cfg->key_code)
		return 0;

	if (device_may_wakeup(&pon->spmi->dev))
		pm_wakeup_event(&pon->spmi->dev, WAKEUP_TIMEOUT_MSEC);

	/* check the RT status to get the current status of the line */
	rc = spmi_ext_register_readl(pon->spmi->ctrl, pon->spmi->sid,
				QPNP_PON_RT_STS(pon), &pon_rt_sts, 1);