ASoC: arizona: Suppress noop FLL updates
[platform/adaptation/renesas_rcar/renesas_kernel.git] / sound / soc / codecs / arizona.c
index 500e6cb..d497643 100644 (file)
@@ -937,6 +937,9 @@ int arizona_set_fll(struct arizona_fll *fll, int source,
        bool ena;
        int ret;
 
+       if (fll->fref == Fref && fll->fout == Fout)
+               return 0;
+
        ret = regmap_read(arizona->regmap, fll->base + 1, &reg);
        if (ret != 0) {
                arizona_fll_err(fll, "Failed to read current state: %d\n",
@@ -1014,6 +1017,9 @@ int arizona_set_fll(struct arizona_fll *fll, int source,
        if (ret == 0)
                arizona_fll_warn(fll, "Timed out waiting for lock\n");
 
+       fll->fref = Fref;
+       fll->fout = Fout;
+
        return 0;
 }
 EXPORT_SYMBOL_GPL(arizona_set_fll);