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

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

Merge "thermal: qpnp-temp-alarm: Configure TEMP ALARM in the shutdown path"

parents 51319344 77ba5201
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -725,6 +725,19 @@ static int qpnp_tm_remove(struct spmi_device *spmi)
	return 0;
}

static void qpnp_tm_shutdown(struct spmi_device *spmi)
{
	struct qpnp_tm_chip *chip = dev_get_drvdata(&spmi->dev);
	int rc;
	u8 reg;

	/* configure TEMP_ALARM to follow HW_EN */
	reg = ALARM_CTRL_FOLLOW_HW_ENABLE;
	rc = qpnp_tm_write(chip, QPNP_TM_REG_ALARM_CTRL, &reg, 1);
	if (rc)
		pr_err("Failed to cfg. TEMP_ALARM to follow HW_EN rc=%d\n", rc);
}

#ifdef CONFIG_PM
static int qpnp_tm_suspend(struct device *dev)
{
@@ -776,6 +789,7 @@ static struct spmi_driver qpnp_tm_driver = {
	},
	.probe	  = qpnp_tm_probe,
	.remove	  = qpnp_tm_remove,
	.shutdown = qpnp_tm_shutdown,
	.id_table = qpnp_tm_id,
};