diff options
author | Martin Povišer <povik+lin@cutebit.org> | 2022-09-15 11:44:42 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-09-19 19:05:35 +0200 |
commit | 94d5f62a91aab6ac9c3f4abfd048cbe5f77153ac (patch) | |
tree | 1bbd233e39f093e3a751839e8e4737f331d8c939 /sound/soc/codecs/cs42l42.c | |
parent | ASoC: cs42l42: Export regmap elements to core namespace (diff) | |
download | linux-94d5f62a91aab6ac9c3f4abfd048cbe5f77153ac.tar.xz linux-94d5f62a91aab6ac9c3f4abfd048cbe5f77153ac.zip |
ASoC: cs42l83: Extend CS42L42 support to new part
The CS42L83 part is a headphone jack codec found in recent Apple
machines. It is a publicly undocumented part but as far as can be told
it is identical to CS42L42 except for two points:
* The chip ID is different.
* Of those registers for which we have a default value in the existing
CS42L42 kernel driver, one register (MCLK_CTL) differs in its reset
value on CS42L83.
To address those two points (and only those), add to the CS42L42 driver
a separate CS42L83 front.
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220915094444.11434-10-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/cs42l42.c')
-rw-r--r-- | sound/soc/codecs/cs42l42.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/soc/codecs/cs42l42.c b/sound/soc/codecs/cs42l42.c index 5d80994de167..0baf98a4236d 100644 --- a/sound/soc/codecs/cs42l42.c +++ b/sound/soc/codecs/cs42l42.c @@ -2318,11 +2318,11 @@ int cs42l42_init(struct cs42l42_private *cs42l42) goto err_disable; } - if (devid != CS42L42_CHIP_ID) { + if (devid != cs42l42->devid) { ret = -ENODEV; dev_err(cs42l42->dev, - "CS42L42 Device ID (%X). Expected %X\n", - devid, CS42L42_CHIP_ID); + "CS42L%x Device ID (%X). Expected %X\n", + cs42l42->devid & 0xff, devid, cs42l42->devid); goto err_disable; } @@ -2333,7 +2333,8 @@ int cs42l42_init(struct cs42l42_private *cs42l42) } dev_info(cs42l42->dev, - "Cirrus Logic CS42L42, Revision: %02X\n", reg & 0xFF); + "Cirrus Logic CS42L%x, Revision: %02X\n", + cs42l42->devid & 0xff, reg & 0xFF); /* Power up the codec */ regmap_update_bits(cs42l42->regmap, CS42L42_PWR_CTL1, |