From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>,
Liam Girdwood <lrg@ti.com>,
Mark Brown <broonie@opensource.wolfsonmicro.com>,
alsa-devel@alsa-project.org
Subject: [PATCH 3/3] ASoC: wm8961: Convert codec->hw_read to regmap_read
Date: Thu, 13 Oct 2011 15:25:20 +0800 [thread overview]
Message-ID: <1318490720.2857.11.camel@phoenix> (raw)
In-Reply-To: <1318490575.2857.8.camel@phoenix>
codec->hw_read is broken now, let's covert to regmap_read.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
sound/soc/codecs/wm8961.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c
index cdee810..2fa1672 100644
--- a/sound/soc/codecs/wm8961.c
+++ b/sound/soc/codecs/wm8961.c
@@ -960,6 +960,7 @@ static int wm8961_probe(struct snd_soc_codec *codec)
struct snd_soc_dapm_context *dapm = &codec->dapm;
int ret = 0;
u16 reg;
+ unsigned int val;
ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C);
if (ret != 0) {
@@ -974,10 +975,10 @@ static int wm8961_probe(struct snd_soc_codec *codec)
}
/* This isn't volatile - readback doesn't correspond to write */
- reg = codec->hw_read(codec, WM8961_RIGHT_INPUT_VOLUME);
+ regmap_read(codec->control_data, WM8961_RIGHT_INPUT_VOLUME, &val);
dev_info(codec->dev, "WM8961 family %d revision %c\n",
- (reg & WM8961_DEVICE_ID_MASK) >> WM8961_DEVICE_ID_SHIFT,
- ((reg & WM8961_CHIP_REV_MASK) >> WM8961_CHIP_REV_SHIFT)
+ (val & WM8961_DEVICE_ID_MASK) >> WM8961_DEVICE_ID_SHIFT,
+ ((val & WM8961_CHIP_REV_MASK) >> WM8961_CHIP_REV_SHIFT)
+ 'A');
ret = wm8961_reset(codec);
--
1.7.4.1
next prev parent reply other threads:[~2011-10-13 7:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-13 7:22 [PATCH 1/3] ASoC: alc5623: " Axel Lin
2011-10-13 7:24 ` [PATCH 2/3] ASoC: tlv320aic3x: " Axel Lin
2011-10-13 7:25 ` Axel Lin [this message]
2011-10-13 16:51 ` [PATCH 1/3] ASoC: alc5623: " Mark Brown
2011-10-13 22:39 ` Axel Lin
2011-10-13 22:52 ` Mark Brown
2011-10-13 23:29 ` Axel Lin
2011-10-13 23:34 ` Mark Brown
2011-10-13 23:32 ` 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=1318490720.2857.11.camel@phoenix \
--to=axel.lin@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=arnaud.patard@rtp-net.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lrg@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome