ASoC: wm8940: Rewrite code to set proper clocks
authorLukasz Majewski <lukma@denx.de>
Fri, 16 Dec 2022 09:46:23 +0000 (10:46 +0100)
committerMark Brown <broonie@kernel.org>
Sun, 25 Dec 2022 23:33:29 +0000 (23:33 +0000)
commit294833fc9eb4e9d6c69f8d158cd991d641e59908
treed06aa8ac4c1e9ef53cee094b07d4533e8c915f32
parent5dc5e76b4c41fc8cdd9ed77653b2ce453974fb30
ASoC: wm8940: Rewrite code to set proper clocks

This patch enables support for internal wm8940's PLL and proper
divider to set proper value for 256x fs clock.

This approach is more flexible and replaces hardcoded clock
values and makes the codec work with the simple-card driver.
Card drivers calling set_pll() and set_clkdiv() directly are
unaffected.

For the reference - code in this commit is based on:
51b2bb3f2568e6d9d81a001d38b8d70c2ba4af99
("ASoC: wm8974: configure pll and mclk divider automatically")

Signed-off-by: Lukasz Majewski <lukma@denx.de>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221216094624.3849278-2-lukma@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm8940.c