Commit 1a734b39 authored by John Hsu's avatar John Hsu Committed by Greg Kroah-Hartman

ASoC: nau8825: fix invalid configuration in Pre-Scalar of FLL


[ Upstream commit a1792cda ]

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: default avatarJohn Hsu <KCHSU0@nuvoton.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@verizon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 15268408
...@@ -936,7 +936,8 @@ static void nau8825_fll_apply(struct nau8825 *nau8825, ...@@ -936,7 +936,8 @@ static void nau8825_fll_apply(struct nau8825 *nau8825,
NAU8825_FLL_INTEGER_MASK, fll_param->fll_int); NAU8825_FLL_INTEGER_MASK, fll_param->fll_int);
/* FLL pre-scaler */ /* FLL pre-scaler */
regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL4, 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 */ /* select divided VCO input */
regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL5, regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL5,
NAU8825_FLL_FILTER_SW_MASK, 0x0000); NAU8825_FLL_FILTER_SW_MASK, 0x0000);
......
...@@ -114,7 +114,8 @@ ...@@ -114,7 +114,8 @@
#define NAU8825_FLL_INTEGER_MASK (0x3ff << 0) #define NAU8825_FLL_INTEGER_MASK (0x3ff << 0)
/* FLL4 (0x07) */ /* 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) */ /* FLL5 (0x08) */
#define NAU8825_FLL_FILTER_SW_MASK (0x1 << 14) #define NAU8825_FLL_FILTER_SW_MASK (0x1 << 14)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment