2020-07-02 23:30:56 +08:00
|
|
|
From 136762e82a9c4974c15b0525245092d11a825cee Mon Sep 17 00:00:00 2001
|
|
|
|
From: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
|
|
Date: Wed, 12 Jul 2017 18:00:58 +0800
|
|
|
|
Subject: [PATCH] MLK-15960-2: ASoC: fsl_sai: refine the pm runtime function
|
|
|
|
|
|
|
|
In imx8qm/imx8qxp, the power domain of IP is enabled when
|
|
|
|
pm_runtime_get_sync() is called, and disabled when pm_runtime
|
|
|
|
_put_sync() is called. when power domain is disabled, the value
|
|
|
|
of registers will lost, so we need to use the regcache_sync()
|
|
|
|
to restore the registers in fsl_sai_runtime_resume.
|
|
|
|
|
|
|
|
Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
|
|
|
|
---
|
|
|
|
sound/soc/fsl/fsl_sai.c | 4 ++++
|
|
|
|
1 file changed, 4 insertions(+)
|
|
|
|
|
|
|
|
--- a/sound/soc/fsl/fsl_sai.c
|
|
|
|
+++ b/sound/soc/fsl/fsl_sai.c
|
kernel: bump to 4.14.193, 4.19.138, 5.4.59 (#5350)
kernel: bump to 4.14.193, 4.19.138, 5.4.59 (#5350)
431fb8c mac80211: add AQL improvements
6bdd4c9 mac80211: add missing backports for building with 4.14 kernels
0106820 mac80211: add missing return code checks in AQL improvements
e7f7101 mac80211: rework encapsulation offload support
[package]
base-files: add function for generating random MAC
dnsmasq: abort dhcp_check on interface state
boot: sync upstream source code
ath10k-ct-firmware/mt76/sch_cake: update to latest git HEAD
[script]
download: add China Mirror Station
[target]
Sync: arc770, ath79, bcm63xx, kirkwood, lantiq, layerscape,
mediatek, mvebu, octeon, oxnas, pistachio, uml
Sync most of the target patches.
Run-compiled-on: ipq40xx (4.19 & 5.4), ramips
2020-08-26 11:31:50 +08:00
|
|
|
@@ -1094,6 +1094,8 @@ static int fsl_sai_probe(struct platform
|
2020-07-02 23:30:56 +08:00
|
|
|
|
|
|
|
pm_runtime_enable(&pdev->dev);
|
|
|
|
|
|
|
|
+ regcache_cache_only(sai->regmap, true);
|
|
|
|
+
|
|
|
|
ret = devm_snd_soc_register_component(&pdev->dev, &fsl_component,
|
|
|
|
&fsl_sai_dai, 1);
|
|
|
|
if (ret)
|
kernel: bump to 4.14.193, 4.19.138, 5.4.59 (#5350)
kernel: bump to 4.14.193, 4.19.138, 5.4.59 (#5350)
431fb8c mac80211: add AQL improvements
6bdd4c9 mac80211: add missing backports for building with 4.14 kernels
0106820 mac80211: add missing return code checks in AQL improvements
e7f7101 mac80211: rework encapsulation offload support
[package]
base-files: add function for generating random MAC
dnsmasq: abort dhcp_check on interface state
boot: sync upstream source code
ath10k-ct-firmware/mt76/sch_cake: update to latest git HEAD
[script]
download: add China Mirror Station
[target]
Sync: arc770, ath79, bcm63xx, kirkwood, lantiq, layerscape,
mediatek, mvebu, octeon, oxnas, pistachio, uml
Sync most of the target patches.
Run-compiled-on: ipq40xx (4.19 & 5.4), ramips
2020-08-26 11:31:50 +08:00
|
|
|
@@ -1137,6 +1139,8 @@ static int fsl_sai_runtime_suspend(struc
|
2020-07-02 23:30:56 +08:00
|
|
|
{
|
|
|
|
struct fsl_sai *sai = dev_get_drvdata(dev);
|
|
|
|
|
|
|
|
+ regcache_cache_only(sai->regmap, true);
|
|
|
|
+
|
|
|
|
if (sai->mclk_streams & BIT(SNDRV_PCM_STREAM_CAPTURE))
|
|
|
|
clk_disable_unprepare(sai->mclk_clk[sai->mclk_id[0]]);
|
|
|
|
|