All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: wm8962: Use force clear for WM8962_SYSCLK_ENA after reset
@ 2020-05-13  5:30 Shengjiu Wang
  2020-05-13  8:21   ` Charles Keepax
  2020-05-13 12:10 ` Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Shengjiu Wang @ 2020-05-13  5:30 UTC (permalink / raw)
  To: lgirdwood, broonie, perex, tiwai, shengjiu.wang, tglx, allison,
	info, patches, alsa-devel, linux-kernel

When CLOCKING2 is non-volatile register, we need force clear
the WM8962_SYSCLK_ENA bit after reset, for the value in cache
maybe 0 but in hardware it is 1. Otherwise there will issue
as below statement in driver.

/* SYSCLK defaults to on; make sure it is off so we can safely
 * write to registers if the device is declocked.

Fixes: c38b608504aa ("ASoC: wm8962: set CLOCKING2 as non-volatile register")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
---
 sound/soc/codecs/wm8962.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 0a2cfff44441..08d19df8a700 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3798,8 +3798,8 @@ static int wm8962_runtime_resume(struct device *dev)
 	/* SYSCLK defaults to on; make sure it is off so we can safely
 	 * write to registers if the device is declocked.
 	 */
-	regmap_update_bits(wm8962->regmap, WM8962_CLOCKING2,
-			   WM8962_SYSCLK_ENA, 0);
+	regmap_write_bits(wm8962->regmap, WM8962_CLOCKING2,
+			  WM8962_SYSCLK_ENA, 0);
 
 	/* Ensure we have soft control over all registers */
 	regmap_update_bits(wm8962->regmap, WM8962_CLOCKING2,
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: wm8962: Use force clear for WM8962_SYSCLK_ENA after reset
  2020-05-13  5:30 [PATCH] ASoC: wm8962: Use force clear for WM8962_SYSCLK_ENA after reset Shengjiu Wang
@ 2020-05-13  8:21   ` Charles Keepax
  2020-05-13 12:10 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Charles Keepax @ 2020-05-13  8:21 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: lgirdwood, broonie, perex, tiwai, tglx, allison, info, patches,
	alsa-devel, linux-kernel

On Wed, May 13, 2020 at 01:30:35PM +0800, Shengjiu Wang wrote:
> When CLOCKING2 is non-volatile register, we need force clear
> the WM8962_SYSCLK_ENA bit after reset, for the value in cache
> maybe 0 but in hardware it is 1. Otherwise there will issue
> as below statement in driver.
> 
> /* SYSCLK defaults to on; make sure it is off so we can safely
>  * write to registers if the device is declocked.
> 
> Fixes: c38b608504aa ("ASoC: wm8962: set CLOCKING2 as non-volatile register")
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: wm8962: Use force clear for WM8962_SYSCLK_ENA after reset
@ 2020-05-13  8:21   ` Charles Keepax
  0 siblings, 0 replies; 4+ messages in thread
From: Charles Keepax @ 2020-05-13  8:21 UTC (permalink / raw)
  To: Shengjiu Wang
  Cc: alsa-devel, linux-kernel, patches, tiwai, lgirdwood, broonie,
	tglx, info, allison

On Wed, May 13, 2020 at 01:30:35PM +0800, Shengjiu Wang wrote:
> When CLOCKING2 is non-volatile register, we need force clear
> the WM8962_SYSCLK_ENA bit after reset, for the value in cache
> maybe 0 but in hardware it is 1. Otherwise there will issue
> as below statement in driver.
> 
> /* SYSCLK defaults to on; make sure it is off so we can safely
>  * write to registers if the device is declocked.
> 
> Fixes: c38b608504aa ("ASoC: wm8962: set CLOCKING2 as non-volatile register")
> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
> ---

Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>

Thanks,
Charles

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ASoC: wm8962: Use force clear for WM8962_SYSCLK_ENA after reset
  2020-05-13  5:30 [PATCH] ASoC: wm8962: Use force clear for WM8962_SYSCLK_ENA after reset Shengjiu Wang
  2020-05-13  8:21   ` Charles Keepax
@ 2020-05-13 12:10 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2020-05-13 12:10 UTC (permalink / raw)
  To: tglx, Shengjiu Wang, alsa-devel, info, lgirdwood, patches, tiwai,
	linux-kernel, allison, perex

On Wed, 13 May 2020 13:30:35 +0800, Shengjiu Wang wrote:
> When CLOCKING2 is non-volatile register, we need force clear
> the WM8962_SYSCLK_ENA bit after reset, for the value in cache
> maybe 0 but in hardware it is 1. Otherwise there will issue
> as below statement in driver.
> 
> /* SYSCLK defaults to on; make sure it is off so we can safely
>  * write to registers if the device is declocked.

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.7

Thanks!

[1/1] ASoC: wm8962: Use force clear for WM8962_SYSCLK_ENA after reset
      commit: 65e412a01bc0161175a962abd5a7fef6a62d5c8e

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-05-13 12:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13  5:30 [PATCH] ASoC: wm8962: Use force clear for WM8962_SYSCLK_ENA after reset Shengjiu Wang
2020-05-13  8:21 ` Charles Keepax
2020-05-13  8:21   ` Charles Keepax
2020-05-13 12:10 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.