The Venus driver is voting Configuration NoC during .probe but not clear
voting in .suspend. Because of this NoC is up during shutdown also. As a
consequence the whole device could leak energy while in .suspend.
So correct this by moving voting in .resume and unvoting
in .suspend
Signed-off-by: Mansur Alisha Shaik <mansur@codeaurora.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
        if (ret)
                return ret;
 
-       ret = icc_set_bw(core->cpucfg_path, 0, kbps_to_icc(1000));
-       if (ret)
-               return ret;
-
        ret = hfi_create(core, &venus_core_ops);
        if (ret)
                return ret;
        if (ret)
                return ret;
 
+       ret = icc_set_bw(core->cpucfg_path, 0, 0);
+       if (ret)
+               return ret;
+
        if (pm_ops->core_power)
                ret = pm_ops->core_power(dev, POWER_OFF);
 
                        return ret;
        }
 
+       ret = icc_set_bw(core->cpucfg_path, 0, kbps_to_icc(1000));
+       if (ret)
+               return ret;
+
        return hfi_core_resume(core, false);
 }