diff options
author | Nicolin Chen <nicoleotsuka@gmail.com> | 2014-08-08 18:41:19 +0800 |
---|---|---|
committer | Shengjiu Wang <shengjiu.wang@freescale.com> | 2014-10-28 18:47:06 +0800 |
commit | ae7d6f57d003169134c1e03acb7df0b9b5350162 (patch) | |
tree | 1f7c9187bb0e5edc12e6dd3643920f0347587bb6 /sound | |
parent | 6a0ed6f7ccb29fb637c498a18fdebc3689bf2206 (diff) |
ASoC: fsl_sai: Make Synchronous and Asynchronous modes exclusive
The previous patch (ASoC: fsl_sai: Add asynchronous mode support) added
new Device Tree bindings for Asynchronous and Synchronous modes support.
However, these two shall not be present at the same time.
So this patch just simply makes them exclusive so as to avoid incorrect
Device Tree binding usage.
Signed-off-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit ce7344a4ebabe90e064d3e087727f45624cdc942)
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/fsl/fsl_sai.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_sai.c b/sound/soc/fsl/fsl_sai.c index 139d100ee445..24704d2757c5 100644 --- a/sound/soc/fsl/fsl_sai.c +++ b/sound/soc/fsl/fsl_sai.c @@ -635,6 +635,13 @@ static int fsl_sai_probe(struct platform_device *pdev) fsl_sai_dai.symmetric_channels = 1; fsl_sai_dai.symmetric_samplebits = 1; + if (of_find_property(np, "fsl,sai-synchronous-rx", NULL) && + of_find_property(np, "fsl,sai-asynchronous", NULL)) { + /* error out if both synchronous and asynchronous are present */ + dev_err(&pdev->dev, "invalid binding for synchronous mode\n"); + return -EINVAL; + } + if (of_find_property(np, "fsl,sai-synchronous-rx", NULL)) { /* Sync Rx with Tx */ sai->synchronous[RX] = false; |