MLK-16549-2: ISI: fix suspend/resume error issue
authorGuoniu.Zhou <guoniu.zhou@nxp.com>
Fri, 8 Dec 2017 11:32:34 +0000 (19:32 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Tue, 20 Mar 2018 19:51:08 +0000 (14:51 -0500)
Because ISI runtime suspend has disable clock before system
suspend. If driver does not know that and disable clock again
in system suspend callback. It will lead to isi clk count mis-
match.

Reviewed-by: Sandor.Yu <sandor.yu@nxp.com>
Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
drivers/media/platform/imx8/mxc-isi-core.c

index 1ddf3d9..29a1999 100644 (file)
@@ -209,7 +209,8 @@ static int mxc_isi_pm_suspend(struct device *dev)
 {
        struct mxc_isi_dev *mxc_isi = dev_get_drvdata(dev);
 
-       if (mxc_isi->flags & MXC_ISI_PM_SUSPENDED)
+       if ((mxc_isi->flags & MXC_ISI_PM_SUSPENDED) ||
+               (mxc_isi->flags & MXC_ISI_RUNTIME_SUSPEND))
                return 0;
 
        clk_disable_unprepare(mxc_isi->clk);