]> git.hungrycats.org Git - linux/commitdiff
ASoC: nau8825: fix invalid configuration in Pre-Scalar of FLL
authorJohn Hsu <KCHSU0@nuvoton.com>
Tue, 20 Dec 2016 04:03:09 +0000 (12:03 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Aug 2017 02:19:45 +0000 (19:19 -0700)
[ Upstream commit a1792cda51300e15b03549cccf0b09f3be82e697 ]

The clk_ref_div is not configured in the correct position of the
register. The patch fixes that clk_ref_div, Pre-Scalar, is assigned
the wrong value.

Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/nau8825.c
sound/soc/codecs/nau8825.h

index c1b87c5800b1d0980cf541e96a4d22ae76e9b32c..b3fddba4c084e3e83b57e3af68682e27808bd6da 100644 (file)
@@ -936,7 +936,8 @@ static void nau8825_fll_apply(struct nau8825 *nau8825,
                        NAU8825_FLL_INTEGER_MASK, fll_param->fll_int);
        /* FLL pre-scaler */
        regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL4,
-                       NAU8825_FLL_REF_DIV_MASK, fll_param->clk_ref_div);
+                       NAU8825_FLL_REF_DIV_MASK,
+                       fll_param->clk_ref_div << NAU8825_FLL_REF_DIV_SFT);
        /* select divided VCO input */
        regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL5,
                        NAU8825_FLL_FILTER_SW_MASK, 0x0000);
index dff8edb83bfdfeb034a230ddbfce02952617eace..a0b220726a63f5eebe398bebf65bfe695ca32215 100644 (file)
 #define NAU8825_FLL_INTEGER_MASK               (0x3ff << 0)
 
 /* FLL4 (0x07) */
-#define NAU8825_FLL_REF_DIV_MASK               (0x3 << 10)
+#define NAU8825_FLL_REF_DIV_SFT        10
+#define NAU8825_FLL_REF_DIV_MASK       (0x3 << NAU8825_FLL_REF_DIV_SFT)
 
 /* FLL5 (0x08) */
 #define NAU8825_FLL_FILTER_SW_MASK             (0x1 << 14)