Skip to content

Commit c38b608

Browse files
TE-N-ShengjiuWangbroonie
authored andcommitted
ASoC: wm8962: set CLOCKING2 as non-volatile register
Previously CLOCKING2 is set as a volatile register, but cause issue at suspend & resume, that some bits of CLOCKING2 is not restored at resume, for example SYSCLK_SRC bits, then the output clock is wrong. The volatile property is caused by CLASSD_CLK_DIV bits, which are controlled by the chip itself. But the datasheet claims these are read only and protected by the security key, and they are not read by the driver at all. So it should be safe to change CLOCKING2 to be non-volatile. Signed-off-by: Shengjiu Wang <[email protected]> Acked-by: Charles Keepax <[email protected]> Link: https://lore.kernel.org/r/6d25d5b36d4b9aeb8655b5e947dad52214e34177.1587693523.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown <[email protected]>
1 parent 41d91ec commit c38b608

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sound/soc/codecs/wm8962.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static const struct reg_default wm8962_reg[] = {
118118
{ 5, 0x0018 }, /* R5 - ADC & DAC Control 1 */
119119
{ 6, 0x2008 }, /* R6 - ADC & DAC Control 2 */
120120
{ 7, 0x000A }, /* R7 - Audio Interface 0 */
121-
121+
{ 8, 0x01E4 }, /* R8 - Clocking2 */
122122
{ 9, 0x0300 }, /* R9 - Audio Interface 1 */
123123
{ 10, 0x00C0 }, /* R10 - Left DAC volume */
124124
{ 11, 0x00C0 }, /* R11 - Right DAC volume */
@@ -788,7 +788,6 @@ static bool wm8962_volatile_register(struct device *dev, unsigned int reg)
788788
{
789789
switch (reg) {
790790
case WM8962_CLOCKING1:
791-
case WM8962_CLOCKING2:
792791
case WM8962_SOFTWARE_RESET:
793792
case WM8962_THERMAL_SHUTDOWN_STATUS:
794793
case WM8962_ADDITIONAL_CONTROL_4:

0 commit comments

Comments
 (0)