summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_spdif.c
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@nxp.com>2017-12-06 10:42:30 +0800
committerDong Aisheng <aisheng.dong@nxp.com>2019-11-25 15:54:18 +0800
commit70e9a07d29d63c64fb365a5bb632621842f8e8d4 (patch)
tree3ddedd22e6e915607bb7dd5fddc99d9fa90ff8c6 /sound/soc/fsl/fsl_spdif.c
parentc4f6be48fdc93d2e7a251e8e3edbfdf81fdfb8ea (diff)
MLK-17089-4: ASoC: fsl_spdif: support suspend & resume for imx8
Base on latest power management design in MLK-17074, every driver need to enter runtime suspend state in suspend, so the driver should call the pm_runtime_force_suspend in suspend. with this implementation the suspend function almost same as runtime suspend function. so remove the suspend function, just use pm_runtime_force_suspend instead. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Diffstat (limited to 'sound/soc/fsl/fsl_spdif.c')
-rw-r--r--sound/soc/fsl/fsl_spdif.c27
1 files changed, 1 insertions, 26 deletions
diff --git a/sound/soc/fsl/fsl_spdif.c b/sound/soc/fsl/fsl_spdif.c
index 8ffb0cccb7e1..bf3e8e6de1a2 100644
--- a/sound/soc/fsl/fsl_spdif.c
+++ b/sound/soc/fsl/fsl_spdif.c
@@ -1487,33 +1487,8 @@ static int fsl_spdif_runtime_suspend(struct device *dev)
}
#endif
-#ifdef CONFIG_PM_SLEEP
-static int fsl_spdif_suspend(struct device *dev)
-{
- struct fsl_spdif_priv *spdif_priv = dev_get_drvdata(dev);
-
- regmap_read(spdif_priv->regmap, REG_SPDIF_SRPC,
- &spdif_priv->regcache_srpc);
-
- regcache_mark_dirty(spdif_priv->regmap);
-
- return 0;
-}
-
-static int fsl_spdif_resume(struct device *dev)
-{
- struct fsl_spdif_priv *spdif_priv = dev_get_drvdata(dev);
-
- regmap_update_bits(spdif_priv->regmap, REG_SPDIF_SRPC,
- SRPC_CLKSRC_SEL_MASK | SRPC_GAINSEL_MASK,
- spdif_priv->regcache_srpc);
-
- return regcache_sync(spdif_priv->regmap);
-}
-#endif /* CONFIG_PM_SLEEP */
-
static const struct dev_pm_ops fsl_spdif_pm = {
- SET_SYSTEM_SLEEP_PM_OPS(fsl_spdif_suspend, fsl_spdif_resume)
+ SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
SET_RUNTIME_PM_OPS(fsl_spdif_runtime_suspend, fsl_spdif_runtime_resume,
NULL)
};