Commit a14bf887 authored by Axel Lin's avatar Axel Lin Committed by Mark Brown

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: default avatarAxel Lin <axel.lin@ingics.com>
Acked-by: default avatarBrian Austin <brian.austin@cirrus.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent c159a850
...@@ -1259,7 +1259,7 @@ static int cs42l52_i2c_probe(struct i2c_client *i2c_client, ...@@ -1259,7 +1259,7 @@ static int cs42l52_i2c_probe(struct i2c_client *i2c_client,
} }
dev_info(&i2c_client->dev, "Cirrus Logic CS42L52, Revision: %02X\n", dev_info(&i2c_client->dev, "Cirrus Logic CS42L52, Revision: %02X\n",
reg & 0xFF); reg & CS42L52_CHIP_REV_MASK);
/* Set Platform Data */ /* Set Platform Data */
if (cs42l52->pdata.mica_diff_cfg) if (cs42l52->pdata.mica_diff_cfg)
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#define CS42L52_CHIP_REV_A0 0x00 #define CS42L52_CHIP_REV_A0 0x00
#define CS42L52_CHIP_REV_A1 0x01 #define CS42L52_CHIP_REV_A1 0x01
#define CS42L52_CHIP_REV_B0 0x02 #define CS42L52_CHIP_REV_B0 0x02
#define CS42L52_CHIP_REV_MASK 0x03 #define CS42L52_CHIP_REV_MASK 0x07
#define CS42L52_PWRCTL1 0x02 #define CS42L52_PWRCTL1 0x02
#define CS42L52_PWRCTL1_PDN_ALL 0x9F #define CS42L52_PWRCTL1_PDN_ALL 0x9F
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment