Skip to contentSkip to conversation

ASoC: cs42l51: Fix mask for REVID

PATCH Applied Axel Lin 3 participants 3 messages Apr 17, 2014 – Apr 18, 2014

Subsystems (3)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 ASoC: cs42l51: Fix mask for REVID

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

---
 sound/soc/codecs/cs42l51.c | 3 ++-
 sound/soc/codecs/cs42l51.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
sound/soc/codecs/cs42l51.c +2 -1
index dadc20d..09488d9 100644
@@ -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);
sound/soc/codecs/cs42l51.h +1 -0
index 641ef18..8c55bf3 100644
@@ -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))
Signature · 1 line
1.8.3.2
maintainer Applied
#2 lore raw
In reply to Axel Lin
Quoted 2 lines · Axel Lin

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

Applied, thanks.