MLK-10903-1: ASoC: fsl_spdif: remove cache only in suspend/resume
authorShengjiu Wang <shengjiu.wang@freescale.com>
Tue, 19 May 2015 05:34:32 +0000 (13:34 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:48:11 +0000 (14:48 -0500)
In imx6qp, there is no mega fast. After suspend, but before resume,
there will be spdif interrupt, if set cache only in suspend, then we
can't clear the interrupt, because regmap_write only write to cache.
So the system will hang for the interrupt can't be cleared.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
(cherry picked from commit 2a6a522c86d6c0fe80023c4327ca7ce4792035c8)

sound/soc/fsl/fsl_spdif.c

index 7dcb23a..ca04adb 100644 (file)
@@ -1332,7 +1332,6 @@ static int fsl_spdif_suspend(struct device *dev)
        regmap_read(spdif_priv->regmap, REG_SPDIF_SRPC,
                        &spdif_priv->regcache_srpc);
 
-       regcache_cache_only(spdif_priv->regmap, true);
        regcache_mark_dirty(spdif_priv->regmap);
 
        return 0;
@@ -1342,8 +1341,6 @@ static int fsl_spdif_resume(struct device *dev)
 {
        struct fsl_spdif_priv *spdif_priv = dev_get_drvdata(dev);
 
-       regcache_cache_only(spdif_priv->regmap, false);
-
        regmap_update_bits(spdif_priv->regmap, REG_SPDIF_SRPC,
                        SRPC_CLKSRC_SEL_MASK | SRPC_GAINSEL_MASK,
                        spdif_priv->regcache_srpc);