diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2013-01-30 00:03:36 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-01-30 03:42:31 -0500 |
commit | 8c2d6a9f9cfa59acfa63ee88e70d58f0ba3eaf21 (patch) | |
tree | 83d3069fd9fb34caee8373061b1c81c6b747ad3c /sound/soc/soc-core.c | |
parent | eef28e10821fb671ba797a41e7cf44e3d244e32e (diff) |
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>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 9d07dc03a1d3..b3d75d2c966a 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, | |||
4229 | { "pdm", SND_SOC_DAIFMT_PDM}, | 4229 | { "pdm", SND_SOC_DAIFMT_PDM}, |
4230 | { "msb", SND_SOC_DAIFMT_MSB }, | 4230 | { "msb", SND_SOC_DAIFMT_MSB }, |
4231 | { "lsb", SND_SOC_DAIFMT_LSB }, | 4231 | { "lsb", SND_SOC_DAIFMT_LSB }, |
4232 | }, of_clock_table[] = { | ||
4233 | { "continuous", SND_SOC_DAIFMT_CONT }, | ||
4234 | { "gated", SND_SOC_DAIFMT_GATED }, | ||
4235 | }; | 4232 | }; |
4236 | 4233 | ||
4237 | if (!prefix) | 4234 | if (!prefix) |
@@ -4253,19 +4250,14 @@ unsigned int snd_soc_of_parse_daifmt(struct device_node *np, | |||
4253 | } | 4250 | } |
4254 | 4251 | ||
4255 | /* | 4252 | /* |
4256 | * check "[prefix]clock-gating = xxx" | 4253 | * check "[prefix]continuous-clock" |
4257 | * SND_SOC_DAIFMT_CLOCK_MASK area | 4254 | * SND_SOC_DAIFMT_CLOCK_MASK area |
4258 | */ | 4255 | */ |
4259 | snprintf(prop, sizeof(prop), "%sclock-gating", prefix); | 4256 | snprintf(prop, sizeof(prop), "%scontinuous-clock", prefix); |
4260 | ret = of_property_read_string(np, prop, &str); | 4257 | if (of_get_property(np, prop, NULL)) |
4261 | if (ret == 0) { | 4258 | format |= SND_SOC_DAIFMT_CONT; |
4262 | for (i = 0; i < ARRAY_SIZE(of_clock_table); i++) { | 4259 | else |
4263 | if (strcmp(str, of_clock_table[i].name) == 0) { | 4260 | format |= SND_SOC_DAIFMT_GATED; |
4264 | format |= of_clock_table[i].val; | ||
4265 | break; | ||
4266 | } | ||
4267 | } | ||
4268 | } | ||
4269 | 4261 | ||
4270 | /* | 4262 | /* |
4271 | * check "[prefix]bitclock-inversion" | 4263 | * check "[prefix]bitclock-inversion" |