ASoC: arizona: Add convience define for clearing SYNCCLK
authorCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Wed, 20 Feb 2013 17:28:41 +0000 (17:28 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 4 Mar 2013 03:01:01 +0000 (11:01 +0800)
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/arizona.c
sound/soc/codecs/arizona.h

index 2bebfae3485f67512f6e4675e26c77eb645fd6e1..6837863b582d84698962a76b0d81a98f6a3c174f 100644 (file)
@@ -1185,7 +1185,7 @@ int arizona_set_fll(struct arizona_fll *fll, int source,
        int ret;
 
        if (fll->ref_src < 0 || fll->ref_src == source) {
-               if (fll->sync_src == -1 &&
+               if (fll->sync_src == ARIZONA_FLL_SRC_NONE &&
                    fll->ref_src == source && fll->ref_freq == Fref &&
                    fll->fout == Fout)
                        return 0;
@@ -1196,7 +1196,7 @@ int arizona_set_fll(struct arizona_fll *fll, int source,
                                return ret;
                }
 
-               fll->sync_src = -1;
+               fll->sync_src = ARIZONA_FLL_SRC_NONE;
                fll->ref_src = source;
                fll->ref_freq = Fref;
        } else {
@@ -1240,7 +1240,7 @@ int arizona_init_fll(struct arizona *arizona, int id, int base, int lock_irq,
        fll->id = id;
        fll->base = base;
        fll->arizona = arizona;
-       fll->sync_src = -1;
+       fll->sync_src = ARIZONA_FLL_SRC_NONE;
 
        /* Configure default refclk to 32kHz if we have one */
        regmap_read(arizona->regmap, ARIZONA_CLOCK_32K_1, &val);
@@ -1250,7 +1250,7 @@ int arizona_init_fll(struct arizona *arizona, int id, int base, int lock_irq,
                fll->ref_src = val & ARIZONA_CLK_32K_SRC_MASK;
                break;
        default:
-               fll->ref_src = -1;
+               fll->ref_src = ARIZONA_FLL_SRC_NONE;
        }
        fll->ref_freq = 32768;
 
index f2ca41f8dc83fbad8c45db6f7c210cf244d4fb7b..3f84943b23bf2c64d001b306220ee1b21232811a 100644 (file)
@@ -32,6 +32,7 @@
 #define ARIZONA_CLK_SRC_AIF2BCLK 0x9
 #define ARIZONA_CLK_SRC_AIF3BCLK 0xa
 
+#define ARIZONA_FLL_SRC_NONE      -1
 #define ARIZONA_FLL_SRC_MCLK1      0
 #define ARIZONA_FLL_SRC_MCLK2      1
 #define ARIZONA_FLL_SRC_SLIMCLK    3