Commit 0608c018 authored by Chancel Liu's avatar Chancel Liu Committed by openeuler-sync-bot
Browse files

ASoC: wm8962: Wait for updated value of WM8962_CLOCKING1 register

stable inclusion
from stable-v5.10.159
commit ddf58f59393bbcf3cefdce0aba669b72cad38ae1
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7NTXH

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ddf58f59393bbcf3cefdce0aba669b72cad38ae1



--------------------------------

[ Upstream commit 3ca507bf ]

DSPCLK_DIV field in WM8962_CLOCKING1 register is used to generate
correct frequency of LRCLK and BCLK. Sometimes the read-only value
can't be updated timely after enabling SYSCLK. This results in wrong
calculation values. Delay is introduced here to wait for newest value
from register. The time of the delay should be at least 500~1000us
according to test.

Signed-off-by: default avatarChancel Liu <chancel.liu@nxp.com>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221109121354.123958-1-chancel.liu@nxp.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
(cherry picked from commit af2aac78)
parent b5b0fa1c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment