Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@kernel.org>
Cc: Brian Austin <brian.austin@cirrus.com>,
	alsa-devel@alsa-project.org,
	Paul Handrigan <Paul.Handrigan@cirrus.com>,
	Arnaud Patard <arnaud.patard@rtp-net.org>,
	Liam Girdwood <lgirdwood@gmail.com>
Subject: [PATCH] ASoC: cs42l51: Fix mask for REVID
Date: Thu, 17 Apr 2014 16:35:43 +0800	[thread overview]
Message-ID: <1397723743.601.0.camel@phoenix> (raw)

The REVID mask was changed by commit a1253ef6d3fa
"ASoC: cs42l51: split i2c from codec driver". Fix it.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 sound/soc/codecs/cs42l51.c | 3 ++-
 sound/soc/codecs/cs42l51.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c
index dadc20d..09488d9 100644
--- a/sound/soc/codecs/cs42l51.c
+++ b/sound/soc/codecs/cs42l51.c
@@ -548,7 +548,8 @@ int cs42l51_probe(struct device *dev, struct regmap *regmap)
 		ret = -ENODEV;
 		goto error;
 	}
-	dev_info(dev, "Cirrus Logic CS42L51, Revision: %02X\n", val & 0xFF);
+	dev_info(dev, "Cirrus Logic CS42L51, Revision: %02X\n",
+		 val & CS42L51_CHIP_REV_MASK);
 
 	ret =  snd_soc_register_codec(dev,
 			&soc_codec_device_cs42l51, &cs42l51_dai, 1);
diff --git a/sound/soc/codecs/cs42l51.h b/sound/soc/codecs/cs42l51.h
index 641ef18..8c55bf3 100644
--- a/sound/soc/codecs/cs42l51.h
+++ b/sound/soc/codecs/cs42l51.h
@@ -26,6 +26,7 @@ int cs42l51_probe(struct device *dev, struct regmap *regmap);
 #define CS42L51_CHIP_ID			0x1B
 #define CS42L51_CHIP_REV_A		0x00
 #define CS42L51_CHIP_REV_B		0x01
+#define CS42L51_CHIP_REV_MASK		0x07
 
 #define CS42L51_CHIP_REV_ID		0x01
 #define CS42L51_MK_CHIP_REV(a, b)	((a)<<3|(b))
-- 
1.8.3.2

             reply	other threads:[~2014-04-17  8:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-17  8:35 Axel Lin [this message]
2014-04-17 13:49 ` [PATCH] ASoC: cs42l51: Fix mask for REVID Brian Austin
2014-04-18 14:59 ` 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=1397723743.601.0.camel@phoenix \
    --to=axel.lin@ingics.com \
    --cc=Paul.Handrigan@cirrus.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnaud.patard@rtp-net.org \
    --cc=brian.austin@cirrus.com \
    --cc=broonie@kernel.org \
    --cc=lgirdwood@gmail.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