ASoC: codecs: tlv320aic3x: add AIC3106
authorJiri Prchal <jiri.prchal@aksignal.cz>
Thu, 8 Apr 2021 13:59:08 +0000 (15:59 +0200)
committerMark Brown <broonie@kernel.org>
Thu, 8 Apr 2021 14:21:49 +0000 (15:21 +0100)
In DT binding is mentioned that this driver is compatible with 3106.
So added compatibility string and model number.

Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Link: https://lore.kernel.org/r/20210408135908.125667-1-jiri.prchal@aksignal.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tlv320aic3x-i2c.c
sound/soc/codecs/tlv320aic3x-spi.c
sound/soc/codecs/tlv320aic3x.c
sound/soc/codecs/tlv320aic3x.h

index 4535bb8..cd0558e 100644 (file)
@@ -40,6 +40,7 @@ static const struct i2c_device_id aic3x_i2c_id[] = {
        { "tlv320aic33", AIC3X_MODEL_33 },
        { "tlv320aic3007", AIC3X_MODEL_3007 },
        { "tlv320aic3104", AIC3X_MODEL_3104 },
+       { "tlv320aic3106", AIC3X_MODEL_3106 },
        { }
 };
 MODULE_DEVICE_TABLE(i2c, aic3x_i2c_id);
@@ -49,6 +50,7 @@ static const struct of_device_id aic3x_of_id[] = {
        { .compatible = "ti,tlv320aic33" },
        { .compatible = "ti,tlv320aic3007" },
        { .compatible = "ti,tlv320aic3104" },
+       { .compatible = "ti,tlv320aic3106" },
        {},
 };
 MODULE_DEVICE_TABLE(of, aic3x_of_id);
index bd78ab0..8c7b6bb 100644 (file)
@@ -45,6 +45,7 @@ static const struct spi_device_id aic3x_spi_id[] = {
        { "tlv320aic33", AIC3X_MODEL_33 },
        { "tlv320aic3007", AIC3X_MODEL_3007 },
        { "tlv320aic3104", AIC3X_MODEL_3104 },
+       { "tlv320aic3106", AIC3X_MODEL_3106 },
        { }
 };
 MODULE_DEVICE_TABLE(spi, aic3x_spi_id);
@@ -54,6 +55,7 @@ static const struct of_device_id aic3x_of_id[] = {
        { .compatible = "ti,tlv320aic33" },
        { .compatible = "ti,tlv320aic3007" },
        { .compatible = "ti,tlv320aic3104" },
+       { .compatible = "ti,tlv320aic3106" },
        {},
 };
 MODULE_DEVICE_TABLE(of, aic3x_of_id);
index 2f35174..7731593 100644 (file)
@@ -1003,6 +1003,7 @@ static int aic3x_add_widgets(struct snd_soc_component *component)
        switch (aic3x->model) {
        case AIC3X_MODEL_3X:
        case AIC3X_MODEL_33:
+       case AIC3X_MODEL_3106:
                snd_soc_dapm_new_controls(dapm, aic3x_extra_dapm_widgets,
                                          ARRAY_SIZE(aic3x_extra_dapm_widgets));
                snd_soc_dapm_add_routes(dapm, intercon_extra,
@@ -1580,6 +1581,7 @@ static int aic3x_init(struct snd_soc_component *component)
        switch (aic3x->model) {
        case AIC3X_MODEL_3X:
        case AIC3X_MODEL_33:
+       case AIC3X_MODEL_3106:
                aic3x_mono_init(component);
                break;
        case AIC3X_MODEL_3007:
@@ -1646,6 +1648,7 @@ static int aic3x_component_probe(struct snd_soc_component *component)
        switch (aic3x->model) {
        case AIC3X_MODEL_3X:
        case AIC3X_MODEL_33:
+       case AIC3X_MODEL_3106:
                snd_soc_add_component_controls(component, aic3x_extra_snd_controls,
                                ARRAY_SIZE(aic3x_extra_snd_controls));
                snd_soc_add_component_controls(component, aic3x_mono_controls,
index 00908f1..7e00639 100644 (file)
@@ -20,6 +20,7 @@ int aic3x_remove(struct device *dev);
 #define AIC3X_MODEL_33 1
 #define AIC3X_MODEL_3007 2
 #define AIC3X_MODEL_3104 3
+#define AIC3X_MODEL_3106 4
 
 /* AIC3X register space */
 #define AIC3X_CACHEREGNUM              110