summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/cs42l42.c
diff options
context:
space:
mode:
authorMartin Povišer <povik+lin@cutebit.org>2022-09-15 12:44:42 +0300
committerMark Brown <broonie@kernel.org>2022-09-19 20:05:35 +0300
commit94d5f62a91aab6ac9c3f4abfd048cbe5f77153ac (patch)
tree1bbd233e39f093e3a751839e8e4737f331d8c939 /sound/soc/codecs/cs42l42.c
parent30b679e2cb058c3dcf6d3ebdf10999f0a7a1644d (diff)
downloadlinux-94d5f62a91aab6ac9c3f4abfd048cbe5f77153ac.tar.xz
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.c9
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,