Unverified Commit 94d5f62a authored by Martin Povišer's avatar Martin Povišer Committed by Mark Brown
Browse files

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: default avatarMartin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220915094444.11434-10-povik+lin@cutebit.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 30b679e2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1906,6 +1906,7 @@ L: alsa-devel@alsa-project.org (moderated for non-subscribers)
S:	Maintained
F:	Documentation/devicetree/bindings/sound/apple,*
F:	sound/soc/apple/*
F:	sound/soc/codecs/cs42l83-i2c.c
ARM/ARTPEC MACHINE SUPPORT
M:	Jesper Nilsson <jesper.nilsson@axis.com>
+1 −0
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@
#define CS42L42_PAGE_30		0x3000

#define CS42L42_CHIP_ID		0x42A42
#define CS42L83_CHIP_ID		0x42A83

/* Page 0x10 Global Registers */
#define CS42L42_DEVID_AB		(CS42L42_PAGE_10 + 0x01)
+7 −0
Original line number Diff line number Diff line
@@ -722,6 +722,13 @@ config SND_SOC_CS42L73
	tristate "Cirrus Logic CS42L73 CODEC"
	depends on I2C

config SND_SOC_CS42L83
	tristate "Cirrus Logic CS42L83 CODEC"
	depends on I2C
	select REGMAP
	select REGMAP_I2C
	select SND_SOC_CS42L42_CORE

config SND_SOC_CS4234
	tristate "Cirrus Logic CS4234 CODEC"
	depends on I2C
+2 −0
Original line number Diff line number Diff line
@@ -71,6 +71,7 @@ snd-soc-cs42l51-i2c-objs := cs42l51-i2c.o
snd-soc-cs42l52-objs := cs42l52.o
snd-soc-cs42l56-objs := cs42l56.o
snd-soc-cs42l73-objs := cs42l73.o
snd-soc-cs42l83-i2c-objs := cs42l83-i2c.o
snd-soc-cs4234-objs := cs4234.o
snd-soc-cs4265-objs := cs4265.o
snd-soc-cs4270-objs := cs4270.o
@@ -430,6 +431,7 @@ obj-$(CONFIG_SND_SOC_CS42L51_I2C) += snd-soc-cs42l51-i2c.o
obj-$(CONFIG_SND_SOC_CS42L52)	+= snd-soc-cs42l52.o
obj-$(CONFIG_SND_SOC_CS42L56)	+= snd-soc-cs42l56.o
obj-$(CONFIG_SND_SOC_CS42L73)	+= snd-soc-cs42l73.o
obj-$(CONFIG_SND_SOC_CS42L83)	+= snd-soc-cs42l83-i2c.o
obj-$(CONFIG_SND_SOC_CS4234)	+= snd-soc-cs4234.o
obj-$(CONFIG_SND_SOC_CS4265)	+= snd-soc-cs4265.o
obj-$(CONFIG_SND_SOC_CS4270)	+= snd-soc-cs4270.o
+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ static int cs42l42_i2c_probe(struct i2c_client *i2c_client)
		return ret;
	}

	cs42l42->devid = CS42L42_CHIP_ID;
	cs42l42->dev = dev;
	cs42l42->regmap = regmap;
	cs42l42->irq = i2c_client->irq;
Loading