LF-3794: ASoC: fsl_xcvr: Fix hang issue after suspend with RX recording
authorShengjiu Wang <shengjiu.wang@nxp.com>
Wed, 19 May 2021 10:26:14 +0000 (18:26 +0800)
committerJason Liu <jason.hui.liu@nxp.com>
Sun, 23 May 2021 02:03:49 +0000 (10:03 +0800)
There is a unhandled interrupt after suspend, which cause endless
interrupt when system resume, so system will hang.

Disable all interrupt in runtime suspend callback.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Viorel Suman <viorel.suman@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
sound/soc/fsl/fsl_xcvr.c

index 8331113..4fbd40a 100644 (file)
@@ -1272,6 +1272,11 @@ static __maybe_unused int fsl_xcvr_runtime_suspend(struct device *dev)
        struct fsl_xcvr *xcvr = dev_get_drvdata(dev);
        int ret;
 
+       ret = regmap_update_bits(xcvr->regmap, FSL_XCVR_EXT_IER0,
+                                FSL_XCVR_IRQ_EARC_ALL, 0);
+       if (ret < 0)
+               dev_err(dev, "Failed to clear IER0: %d\n", ret);
+
        /* Assert M0+ reset */
        ret = regmap_update_bits(xcvr->regmap, FSL_XCVR_EXT_CTRL,
                                 FSL_XCVR_EXT_CTRL_CORE_RESET,