2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-02 02:34:05 +08:00

ASoC: arizona: Don't enable FLL on REFCLK configuration

Enabling the FLL when REFCLK is being configured is not what the user
would expect and can cause issues if SYNCCLK has no specified frequency.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Charles Keepax 2013-02-22 17:10:37 +00:00 committed by Mark Brown
parent ddbce97cd1
commit 1c5617fc23

View File

@ -1183,17 +1183,17 @@ int arizona_set_fll_refclk(struct arizona_fll *fll, int source,
if (source < 0) if (source < 0)
return -EINVAL; return -EINVAL;
if (fll->ref_src == source && fll->ref_freq == Fref && if (fll->ref_src == source && fll->ref_freq == Fref)
fll->fout == Fout)
return 0; return 0;
if (Fout) { if (fll->fout) {
ret = arizona_calc_fll(fll, &ref, Fref, Fout); ret = arizona_calc_fll(fll, &ref, Fref, fll->fout);
if (ret != 0) if (ret != 0)
return ret; return ret;
if (fll->sync_src >= 0) { if (fll->sync_src >= 0) {
ret = arizona_calc_fll(fll, &sync, fll->sync_freq, Fout); ret = arizona_calc_fll(fll, &sync, fll->sync_freq,
fll->fout);
if (ret != 0) if (ret != 0)
return ret; return ret;
} }
@ -1201,12 +1201,9 @@ int arizona_set_fll_refclk(struct arizona_fll *fll, int source,
fll->ref_src = source; fll->ref_src = source;
fll->ref_freq = Fref; fll->ref_freq = Fref;
fll->fout = Fout;
if (Fout) { if (fll->fout) {
arizona_enable_fll(fll, &ref, &sync); arizona_enable_fll(fll, &ref, &sync);
} else {
arizona_disable_fll(fll);
} }
return 0; return 0;