summaryrefslogtreecommitdiffstats
path: root/sound/soc/samsung
diff options
context:
space:
mode:
authorSylwester Nawrocki2015-01-14 19:42:37 +0100
committerMark Brown2015-01-14 20:46:54 +0100
commitecb400cabb37cfef3221e45e4f6370a855aa7a44 (patch)
tree339ec79a5c4cad5f9abb7c0893c084bf57626fed /sound/soc/samsung
parentASoC: samsung: i2s: Protect more registers with a spinlock (diff)
downloadkernel-qcow2-linux-ecb400cabb37cfef3221e45e4f6370a855aa7a44.tar.gz
kernel-qcow2-linux-ecb400cabb37cfef3221e45e4f6370a855aa7a44.tar.xz
kernel-qcow2-linux-ecb400cabb37cfef3221e45e4f6370a855aa7a44.zip
ASoC: samsung: odroidx2: Handle I2S CDCLK clock conditionally
In order to support old DTs we check the codec device node if it contains "clocks" property and only if it doesn't (which indicates an old DT) we proceed with enabling the CDCLK clock by means of the set_sysclk() callback. For new DTs which use the common clock bindings for CDCLK that clock is supposed to be handled outside the sound machine driver. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/samsung')
-rw-r--r--sound/soc/samsung/odroidx2_max98090.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sound/soc/samsung/odroidx2_max98090.c b/sound/soc/samsung/odroidx2_max98090.c
index fa4f1d2f69bf..596f1180a369 100644
--- a/sound/soc/samsung/odroidx2_max98090.c
+++ b/sound/soc/samsung/odroidx2_max98090.c
@@ -21,6 +21,8 @@ struct odroidx2_drv_data {
/* The I2S CDCLK output clock frequency for the MAX98090 codec */
#define MAX98090_MCLK 19200000
+static struct snd_soc_dai_link odroidx2_dai[];
+
static int odroidx2_late_probe(struct snd_soc_card *card)
{
struct snd_soc_dai *codec_dai = card->rtd[0].codec_dai;
@@ -29,7 +31,9 @@ static int odroidx2_late_probe(struct snd_soc_card *card)
ret = snd_soc_dai_set_sysclk(codec_dai, 0, MAX98090_MCLK,
SND_SOC_CLOCK_IN);
- if (ret < 0)
+
+ if (ret < 0 || of_find_property(odroidx2_dai[0].codec_of_node,
+ "clocks", NULL))
return ret;
/* Set the cpu DAI configuration in order to use CDCLK */