Skip to content

Commit

Permalink
ASoC: cs42l52: Fix mask for REVID
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
AxelLin authored and broonie committed Apr 7, 2014
1 parent c159a85 commit a14bf88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sound/soc/codecs/cs42l52.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
reg & 0xFF);
reg & CS42L52_CHIP_REV_MASK);

/* Set Platform Data */
if (cs42l52->pdata.mica_diff_cfg)
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/codecs/cs42l52.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#define CS42L52_CHIP_REV_A0 0x00
#define CS42L52_CHIP_REV_A1 0x01
#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_PDN_ALL 0x9F
Expand Down

0 comments on commit a14bf88

Please sign in to comment.