Skip to content

Commit

Permalink
ASoC: alc5623: Fix regmap endianness
Browse files Browse the repository at this point in the history
Commit 0cd257b, "ASoC: alc5623:
Convert to direct regmap API usage" broke probing of the codec,
because of wrong endinness of the ID and codec version read from the
device. Fix this by removing the existing flipping of the endiannes,
and extracting the codec type byte from the word from the regmap.

Signed-off-by: Andrew Lunn <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
  • Loading branch information
lunn authored and broonie committed Apr 15, 2014
1 parent c9eaa44 commit 8aaa414
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/soc/codecs/alc5623.c
Original file line number Diff line number Diff line change
Expand Up @@ -1018,13 +1018,13 @@ static int alc5623_i2c_probe(struct i2c_client *client,
dev_err(&client->dev, "failed to read vendor ID1: %d\n", ret);
return ret;
}
vid1 = ((vid1 & 0xff) << 8) | (vid1 >> 8);

ret = regmap_read(alc5623->regmap, ALC5623_VENDOR_ID2, &vid2);
if (ret < 0) {
dev_err(&client->dev, "failed to read vendor ID2: %d\n", ret);
return ret;
}
vid2 >>= 8;

if ((vid1 != 0x10ec) || (vid2 != id->driver_data)) {
dev_err(&client->dev, "unknown or wrong codec\n");
Expand Down

0 comments on commit 8aaa414

Please sign in to comment.