Madera:Pick cirrus' patch from ODM's base
authoryao zhengming <yaozm1@motorola.com>
Thu, 24 Jan 2019 11:01:16 +0000 (06:01 -0500)
committerlingsen1 <lingsen1@lenovo.com>
Sun, 7 Feb 2021 09:36:54 +0000 (17:36 +0800)
EKKANE-629:[Kane][audio]kernel:Add soft reset as part of resume

1,madera can not power down DCVDD ,so need soft reset when resume

Change-Id: I3d3291c25c6a846bcf3123fc8d1f0741a3963eb0
Signed-off-by: zhangjiaquan <zhangjiaquan@huaqin.com>
(cherry picked from commit 71c5fd1c8dfaf351ff9eec2aae7bd98926eb9741)
Signed-off-by: yaozm1 <yaozm1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1300905
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key

drivers/mfd/madera-core.c

index 7c327fb6d0e6a724664be7005438e86e594cab57..098156b951fcf4f396d324e94cc7f756640e5cfb 100755 (executable)
@@ -289,6 +289,13 @@ static int madera_runtime_resume(struct device *dev)
        regcache_cache_only(madera->regmap, false);
        regcache_cache_only(madera->regmap_32bit, false);
 
+       usleep_range(2000, 3000);
+       ret = madera_soft_reset(madera);
+       if (ret) {
+               dev_err(dev, "Failed to reset: %d\n", ret);
+               goto err;
+       }
+
        ret = madera_wait_for_boot(madera);
        if (ret)
                goto err;