Madera:Pick cirrus' patch from ODM's base
authoryao zhengming <yaozm1@motorola.com>
Thu, 24 Jan 2019 11:01:16 +0000 (06:01 -0500)
committerxiest1 <xiest1@lenovo.com>
Tue, 5 Nov 2019 09:30:39 +0000 (17:30 +0800)
(CR):[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@mt.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;