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

Commit 69780233 authored by Santosh Dronamraju's avatar Santosh Dronamraju
Browse files

mmc: sdhci-msm: Register call back function for hibernation



Register the restore call back function sdhci-msm driver
to support hibernation.

Set the flag to reset the ICE in SDHC restore path during
hibernation resume.This ensures ICE gets reset when
SDHC resumes in S2D.ICE needs to be reset only when
SDHC gets h/w reset(this is to keep SHDC and ICE in sync).

Change-Id: I74d82602c2e8b81c874c9972ff3fb093274ee111
Signed-off-by: default avatarSantosh Dronamraju <sdronamr@codeaurora.org>
parent eb78e980
Loading
Loading
Loading
Loading
+18 −5
Original line number Original line Diff line number Diff line
@@ -2,7 +2,7 @@
 * drivers/mmc/host/sdhci-msm.c - Qualcomm Technologies, Inc. MSM SDHCI Platform
 * drivers/mmc/host/sdhci-msm.c - Qualcomm Technologies, Inc. MSM SDHCI Platform
 * driver source file
 * driver source file
 *
 *
 * Copyright (c) 2012-2019, The Linux Foundation. All rights reserved.
 * Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * it under the terms of the GNU General Public License version 2 and
@@ -5559,11 +5559,24 @@ static int sdhci_msm_suspend_noirq(struct device *dev)
	return ret;
	return ret;
}
}


static int sdhci_msm_restore(struct device *dev)
{
	struct sdhci_host *host = dev_get_drvdata(dev);
	struct mmc_host *mmc = host->mmc;

	if (mmc->inlinecrypt_support)
		mmc->inlinecrypt_reset_needed = true;

	return 0;
}

static const struct dev_pm_ops sdhci_msm_pmops = {
static const struct dev_pm_ops sdhci_msm_pmops = {
	SET_LATE_SYSTEM_SLEEP_PM_OPS(sdhci_msm_suspend, sdhci_msm_resume)
	.suspend_late		= sdhci_msm_suspend,
	SET_RUNTIME_PM_OPS(sdhci_msm_runtime_suspend, sdhci_msm_runtime_resume,
	.resume_early		= sdhci_msm_resume,
			   NULL)
	.runtime_suspend	= sdhci_msm_runtime_suspend,
	.runtime_resume		= sdhci_msm_runtime_resume,
	.suspend_noirq		= sdhci_msm_suspend_noirq,
	.suspend_noirq		= sdhci_msm_suspend_noirq,
	.restore		= sdhci_msm_restore,
};
};


#define SDHCI_MSM_PMOPS (&sdhci_msm_pmops)
#define SDHCI_MSM_PMOPS (&sdhci_msm_pmops)