OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1dc658b
)
ASoC: fsl_sai: Set MCLK input or output direction
author
Shengjiu Wang
<shengjiu.wang@nxp.com>
Thu, 17 Sep 2020 06:11:19 +0000
(14:11 +0800)
committer
Mark Brown
<broonie@kernel.org>
Thu, 17 Sep 2020 15:34:01 +0000
(16:34 +0100)
SAI support select MCLK direction with version.major > 3
and version.minor > 1, the default direction is input,
set it to be output according to DT property.
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Link:
https://lore.kernel.org/r/1600323079-5317-4-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_sai.c
patch
|
blob
|
history
diff --git
a/sound/soc/fsl/fsl_sai.c
b/sound/soc/fsl/fsl_sai.c
index
738b4dd
..
5117c1c
100644
(file)
--- a/
sound/soc/fsl/fsl_sai.c
+++ b/
sound/soc/fsl/fsl_sai.c
@@
-1117,6
+1117,13
@@
static int fsl_sai_probe(struct platform_device *pdev)
if (ret < 0)
dev_warn(&pdev->dev, "Error reading SAI version: %d\n", ret);
+ /* Select MCLK direction */
+ if (of_find_property(np, "fsl,sai-mclk-direction-output", NULL) &&
+ sai->verid.major >= 3 && sai->verid.minor >= 1) {
+ regmap_update_bits(sai->regmap, FSL_SAI_MCTL,
+ FSL_SAI_MCTL_MCLK_EN, FSL_SAI_MCTL_MCLK_EN);
+ }
+
pm_runtime_enable(&pdev->dev);
regcache_cache_only(sai->regmap, true);