From: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
To: lee.jones@linaro.org, broonie@kernel.org
Cc: patches@opensource.wolfsonmicro.com,
linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org
Subject: [PATCH 2/2] ASoC: arizona: No need to update_bits when writing AEC clock control
Date: Tue, 26 Apr 2016 17:06:20 +0100 [thread overview]
Message-ID: <1461686780-22885-3-git-send-email-rf@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1461686780-22885-1-git-send-email-rf@opensource.wolfsonmicro.com>
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
WARNING: multiple messages have this Message-ID (diff)
From: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
To: <lee.jones@linaro.org>, <broonie@kernel.org>
Cc: <patches@opensource.wolfsonmicro.com>,
<linux-kernel@vger.kernel.org>, <alsa-devel@alsa-project.org>
Subject: [PATCH 2/2] ASoC: arizona: No need to update_bits when writing AEC clock control
Date: Tue, 26 Apr 2016 17:06:20 +0100 [thread overview]
Message-ID: <1461686780-22885-3-git-send-email-rf@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1461686780-22885-1-git-send-email-rf@opensource.wolfsonmicro.com>
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
next prev parent reply other threads:[~2016-04-26 16:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-26 16:06 [PATCH 0/2] wm5110: fixes to ANC clock control Richard Fitzgerald
2016-04-26 16:06 ` Richard Fitzgerald
2016-04-26 16:06 ` [PATCH 1/2] mfd: wm5110: ARIZONA_CLOCK_CONTROL should be volatile Richard Fitzgerald
2016-04-26 16:06 ` Richard Fitzgerald
2016-05-09 11:16 ` Lee Jones
2016-05-09 11:16 ` Lee Jones
2016-04-26 16:06 ` Richard Fitzgerald [this message]
2016-04-26 16:06 ` [PATCH 2/2] ASoC: arizona: No need to update_bits when writing AEC clock control Richard Fitzgerald
2016-04-26 18:24 ` Applied "ASoC: arizona: No need to update_bits when writing AEC clock control" to the asoc tree Mark Brown
2016-04-26 18:24 ` Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1461686780-22885-3-git-send-email-rf@opensource.wolfsonmicro.com \
--to=rf@opensource.wolfsonmicro.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lee.jones@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.wolfsonmicro.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.