[2/3] ASoC: nau8810: add support for nau8812
diff mbox series

Message ID 20191115160819.15557-3-m.felsch@pengutronix.de
State New
Headers show
Series
  • Add NAU8812 support
Related show

Commit Message

Marco Felsch Nov. 15, 2019, 4:08 p.m. UTC
The nau8812 device [1] uses exactly the same register layout as the
nau8810 so there is no need to differentiate those. The only difference
is the output power and an additional aux-port input on the nau8812.
The registers related to the aux-port don't affect the nau8810 in a
negative way. They are just ignored (set to '0').

[1] http://www.nuvoton.com/resource-files/NAU8812DatasheetRev2.7.pdf

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 sound/soc/codecs/Kconfig   | 2 +-
 sound/soc/codecs/nau8810.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 229cc89f8c5a..d13a2e5d0afb 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -1470,7 +1470,7 @@  config SND_SOC_NAU8540
        depends on I2C
 
 config SND_SOC_NAU8810
-	tristate "Nuvoton Technology Corporation NAU88C10 CODEC"
+	tristate "Nuvoton Technology Corporation NAU88C10/12 CODEC"
 	depends on I2C
 
 config SND_SOC_NAU8822
diff --git a/sound/soc/codecs/nau8810.c b/sound/soc/codecs/nau8810.c
index de26758c30a8..a32a4a8d5f50 100644
--- a/sound/soc/codecs/nau8810.c
+++ b/sound/soc/codecs/nau8810.c
@@ -862,6 +862,7 @@  static int nau8810_i2c_probe(struct i2c_client *i2c,
 
 static const struct i2c_device_id nau8810_i2c_id[] = {
 	{ "nau8810", 0 },
+	{ "nau8812", 0 },
 	{ }
 };
 MODULE_DEVICE_TABLE(i2c, nau8810_i2c_id);
@@ -869,6 +870,7 @@  MODULE_DEVICE_TABLE(i2c, nau8810_i2c_id);
 #ifdef CONFIG_OF
 static const struct of_device_id nau8810_of_match[] = {
 	{ .compatible = "nuvoton,nau8810", },
+	{ .compatible = "nuvoton,nau8812", },
 	{ }
 };
 MODULE_DEVICE_TABLE(of, nau8810_of_match);