Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: cs42l52: Fix mask for REVID

BIT[0:2] of register 01h is REVID, so the mask for REVID should be 0x7.
Also updates the code to use CS42L52_CHIP_REV_MASK.

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>

authored by

Axel Lin and committed by
Mark Brown
a14bf887 c159a850

+2 -2
+1 -1
sound/soc/codecs/cs42l52.c
··· 1259 1259 } 1260 1260 1261 1261 dev_info(&i2c_client->dev, "Cirrus Logic CS42L52, Revision: %02X\n", 1262 - reg & 0xFF); 1262 + reg & CS42L52_CHIP_REV_MASK); 1263 1263 1264 1264 /* Set Platform Data */ 1265 1265 if (cs42l52->pdata.mica_diff_cfg)
+1 -1
sound/soc/codecs/cs42l52.h
··· 37 37 #define CS42L52_CHIP_REV_A0 0x00 38 38 #define CS42L52_CHIP_REV_A1 0x01 39 39 #define CS42L52_CHIP_REV_B0 0x02 40 - #define CS42L52_CHIP_REV_MASK 0x03 40 + #define CS42L52_CHIP_REV_MASK 0x07 41 41 42 42 #define CS42L52_PWRCTL1 0x02 43 43 #define CS42L52_PWRCTL1_PDN_ALL 0x9F