mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 06:06:44 +07:00
dmaengine: tegra210-adma: update system sleep callbacks
If the driver is active till late suspend, where runtime PM cannot run, force suspend is essential in such case to put the device in low power state. Thus pm_runtime_force_suspend and pm_runtime_force_resume are used as system sleep callbacks during system wide PM transitions. Late system sleep callbacks are used to ensure, for instance, that the sound core has suspended any on-going activity, including stopping the ADMA if active, before we attempt to suspend the ADMA. Suggested-by: Jonathan Hunter <jonathanh@nvidia.com> Signed-off-by: Sameer Pujar <spujar@nvidia.com> Acked-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
parent
f6ed6491d5
commit
74fca241e6
@ -796,17 +796,11 @@ static int tegra_adma_remove(struct platform_device *pdev)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM_SLEEP
|
|
||||||
static int tegra_adma_pm_suspend(struct device *dev)
|
|
||||||
{
|
|
||||||
return pm_runtime_suspended(dev) == false;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static const struct dev_pm_ops tegra_adma_dev_pm_ops = {
|
static const struct dev_pm_ops tegra_adma_dev_pm_ops = {
|
||||||
SET_RUNTIME_PM_OPS(tegra_adma_runtime_suspend,
|
SET_RUNTIME_PM_OPS(tegra_adma_runtime_suspend,
|
||||||
tegra_adma_runtime_resume, NULL)
|
tegra_adma_runtime_resume, NULL)
|
||||||
SET_SYSTEM_SLEEP_PM_OPS(tegra_adma_pm_suspend, NULL)
|
SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||||
|
pm_runtime_force_resume)
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_driver tegra_admac_driver = {
|
static struct platform_driver tegra_admac_driver = {
|
||||||
|
Loading…
Reference in New Issue
Block a user