Skip to content

Commit 1a734b3

Browse files
John-Hsugregkh
authored andcommitted
ASoC: nau8825: fix invalid configuration in Pre-Scalar of FLL
[ 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>
1 parent 1526840 commit 1a734b3

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

sound/soc/codecs/nau8825.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,8 @@ static void nau8825_fll_apply(struct nau8825 *nau8825,
936936
NAU8825_FLL_INTEGER_MASK, fll_param->fll_int);
937937
/* FLL pre-scaler */
938938
regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL4,
939-
NAU8825_FLL_REF_DIV_MASK, fll_param->clk_ref_div);
939+
NAU8825_FLL_REF_DIV_MASK,
940+
fll_param->clk_ref_div << NAU8825_FLL_REF_DIV_SFT);
940941
/* select divided VCO input */
941942
regmap_update_bits(nau8825->regmap, NAU8825_REG_FLL5,
942943
NAU8825_FLL_FILTER_SW_MASK, 0x0000);

sound/soc/codecs/nau8825.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@
114114
#define NAU8825_FLL_INTEGER_MASK (0x3ff << 0)
115115

116116
/* FLL4 (0x07) */
117-
#define NAU8825_FLL_REF_DIV_MASK (0x3 << 10)
117+
#define NAU8825_FLL_REF_DIV_SFT 10
118+
#define NAU8825_FLL_REF_DIV_MASK (0x3 << NAU8825_FLL_REF_DIV_SFT)
118119

119120
/* FLL5 (0x08) */
120121
#define NAU8825_FLL_FILTER_SW_MASK (0x1 << 14)

0 commit comments

Comments
 (0)