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>
This commit is contained in:
parent
eef28e1082
commit
8c2d6a9f9c
|
@ -4229,9 +4229,6 @@ unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
|
||||||
{ "pdm", SND_SOC_DAIFMT_PDM},
|
{ "pdm", SND_SOC_DAIFMT_PDM},
|
||||||
{ "msb", SND_SOC_DAIFMT_MSB },
|
{ "msb", SND_SOC_DAIFMT_MSB },
|
||||||
{ "lsb", SND_SOC_DAIFMT_LSB },
|
{ "lsb", SND_SOC_DAIFMT_LSB },
|
||||||
}, of_clock_table[] = {
|
|
||||||
{ "continuous", SND_SOC_DAIFMT_CONT },
|
|
||||||
{ "gated", SND_SOC_DAIFMT_GATED },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!prefix)
|
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
|
* SND_SOC_DAIFMT_CLOCK_MASK area
|
||||||
*/
|
*/
|
||||||
snprintf(prop, sizeof(prop), "%sclock-gating", prefix);
|
snprintf(prop, sizeof(prop), "%scontinuous-clock", prefix);
|
||||||
ret = of_property_read_string(np, prop, &str);
|
if (of_get_property(np, prop, NULL))
|
||||||
if (ret == 0) {
|
format |= SND_SOC_DAIFMT_CONT;
|
||||||
for (i = 0; i < ARRAY_SIZE(of_clock_table); i++) {
|
else
|
||||||
if (strcmp(str, of_clock_table[i].name) == 0) {
|
format |= SND_SOC_DAIFMT_GATED;
|
||||||
format |= of_clock_table[i].val;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* check "[prefix]bitclock-inversion"
|
* check "[prefix]bitclock-inversion"
|
||||||
|
|
Loading…
Reference in New Issue