Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1387661

[PATCH 2/2] ASoC: arizona: No need to update_bits when writing AEC clock control

From Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Newsgroups linux.kernel
Subject [PATCH 2/2] ASoC: arizona: No need to update_bits when writing AEC clock control
Date 2016-04-26 18:10 +0200
Message-ID <rsdIK-27l-31@gated-at.bofh.it> (permalink)
References <rsdIK-27l-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


The bits in the ARIZONA_CLOCK_CONTROL register only respond to writes of
a '1', a write of '0' is ignored. So there's no need to use update_bits.
We can do a simple write to set bits.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
---
 sound/soc/codecs/arizona.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c
index 0cd27e0..e255740 100644
--- a/sound/soc/codecs/arizona.c
+++ b/sound/soc/codecs/arizona.c
@@ -1126,7 +1126,6 @@ int arizona_anc_ev(struct snd_soc_dapm_widget *w,
 		   int event)
 {
 	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
-	unsigned int mask = 0x3 << w->shift;
 	unsigned int val;
 
 	switch (event) {
@@ -1140,7 +1139,7 @@ int arizona_anc_ev(struct snd_soc_dapm_widget *w,
 		return 0;
 	}
 
-	snd_soc_update_bits(codec, ARIZONA_CLOCK_CONTROL, mask, val);
+	snd_soc_write(codec, ARIZONA_CLOCK_CONTROL, val);
 
 	return 0;
 }
-- 
1.9.1

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] wm5110: fixes to ANC clock control Richard Fitzgerald <rf@opensource.wolfsonmicro.com> - 2016-04-26 18:10 +0200
  [PATCH 2/2] ASoC: arizona: No need to update_bits when writing AEC clock control Richard Fitzgerald <rf@opensource.wolfsonmicro.com> - 2016-04-26 18:10 +0200
    Applied "ASoC: arizona: No need to update_bits when writing AEC clock control" to the asoc tree Mark Brown <broonie@kernel.org> - 2016-04-26 20:30 +0200

csiph-web