summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2013-01-29 21:03:36 -0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-01-30 16:42:31 +0800
commit8c2d6a9f9cfa59acfa63ee88e70d58f0ba3eaf21 (patch)
tree83d3069fd9fb34caee8373061b1c81c6b747ad3c
parenteef28e10821fb671ba797a41e7cf44e3d244e32e (diff)
downloadlinux-3.10-8c2d6a9f9cfa59acfa63ee88e70d58f0ba3eaf21.tar.gz
linux-3.10-8c2d6a9f9cfa59acfa63ee88e70d58f0ba3eaf21.tar.bz2
linux-3.10-8c2d6a9f9cfa59acfa63ee88e70d58f0ba3eaf21.zip
ASoC: clock gating is decided by bool on snd_soc_of_parse_daifmt()
ASoC clock gate settings are continuous/gated only. This patch decides it as bool, then, gated clock will be default. Special thanks to Stephen Cc: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r--sound/soc/soc-core.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 9d07dc03a1d..b3d75d2c966 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -4229,9 +4229,6 @@ unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
{ "pdm", SND_SOC_DAIFMT_PDM},
{ "msb", SND_SOC_DAIFMT_MSB },
{ "lsb", SND_SOC_DAIFMT_LSB },
- }, of_clock_table[] = {
- { "continuous", SND_SOC_DAIFMT_CONT },
- { "gated", SND_SOC_DAIFMT_GATED },
};
if (!prefix)
@@ -4253,19 +4250,14 @@ unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
}
/*
- * check "[prefix]clock-gating = xxx"
+ * check "[prefix]continuous-clock"
* SND_SOC_DAIFMT_CLOCK_MASK area
*/
- snprintf(prop, sizeof(prop), "%sclock-gating", prefix);
- ret = of_property_read_string(np, prop, &str);
- if (ret == 0) {
- for (i = 0; i < ARRAY_SIZE(of_clock_table); i++) {
- if (strcmp(str, of_clock_table[i].name) == 0) {
- format |= of_clock_table[i].val;
- break;
- }
- }
- }
+ snprintf(prop, sizeof(prop), "%scontinuous-clock", prefix);
+ if (of_get_property(np, prop, NULL))
+ format |= SND_SOC_DAIFMT_CONT;
+ else
+ format |= SND_SOC_DAIFMT_GATED;
/*
* check "[prefix]bitclock-inversion"