ASoC: arizona: Suppress noop FLL updates
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 21 Nov 2012 05:12:22 +0000 (14:12 +0900)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 27 Nov 2012 19:30:56 +0000 (19:30 +0000)
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/arizona.c
sound/soc/codecs/arizona.h

index 500e6cb462d8a6782f89d6b31ed4801ac104ca2e..d49764388f1cfa70338f4c1cf846613daaee46c3 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);
index f1c0ec924e3c1129f3fb5a6817164a0aa200e45a..84c415d335bd354ee39b762f8bf4032f38126678 100644 (file)
@@ -191,6 +191,8 @@ struct arizona_fll {
        unsigned int vco_mult;
        struct completion lock;
        struct completion ok;
+       unsigned int fref;
+       unsigned int fout;
 
        char lock_name[ARIZONA_FLL_NAME_LEN];
        char clock_ok_name[ARIZONA_FLL_NAME_LEN];