ASoC: cs42l51: Fix mask for REVID
authorAxel Lin <axel.lin@ingics.com>
Thu, 17 Apr 2014 08:35:43 +0000 (16:35 +0800)
committerMark Brown <broonie@linaro.org>
Fri, 18 Apr 2014 14:59:07 +0000 (15:59 +0100)
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>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/codecs/cs42l51.c
sound/soc/codecs/cs42l51.h

index 46abd3e02f1429000b90e335babac2f02d0ad3b4..6aa69e5aaa3faf88ecbc78e962c9fdb2e04f7aa6 100644 (file)
@@ -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);
index 641ef18435b3baf0c274f589c57079bcd3590fed..8c55bf384bc65189545807d9ce9278d6c66670f2 100644 (file)
@@ -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))