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

Commit 22412fd2 authored by Rama Krishna Phani A's avatar Rama Krishna Phani A
Browse files

i2c: qcom: geni: Add support for suspend to disk



Add support to I2C-GENI driver for suspend to
disk feature.

Change-Id: I60e13bac397223bae296e311e93042dd4c793044
Signed-off-by: default avatarRama Krishna Phani A <rphani@codeaurora.org>
parent 2c002bab
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -967,6 +967,16 @@ static int geni_i2c_resume_noirq(struct device *device)
	return 0;
}

static int geni_i2c_hib_resume_noirq(struct device *device)
{
	struct geni_i2c_dev *gi2c = dev_get_drvdata(device);

	GENI_SE_DBG(gi2c->ipcl, false, gi2c->dev,
				    "%s\n", __func__);
	gi2c->se_mode = UNINITIALIZED;
	return 0;
}

#ifdef CONFIG_PM
static int geni_i2c_runtime_suspend(struct device *dev)
{
@@ -1081,6 +1091,8 @@ static const struct dev_pm_ops geni_i2c_pm_ops = {
	.resume_noirq		= geni_i2c_resume_noirq,
	.runtime_suspend	= geni_i2c_runtime_suspend,
	.runtime_resume		= geni_i2c_runtime_resume,
	.freeze			= geni_i2c_suspend_noirq,
	.restore		= geni_i2c_hib_resume_noirq,
};

static const struct of_device_id geni_i2c_dt_match[] = {