]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: sun8i-codec-analog: add support for V3s SoC
authorIcenowy Zheng <icenowy@aosc.xyz>
Mon, 5 Jun 2017 13:27:21 +0000 (21:27 +0800)
committerMark Brown <broonie@kernel.org>
Tue, 6 Jun 2017 18:29:54 +0000 (19:29 +0100)
The V3s SoC features an analog codec with headphone support but without
mic2 and linein.

Add support for it.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt
sound/soc/sunxi/sun8i-codec-analog.c

index 779b735781ba864484ae77f7c2ac2490c6f363a8..1b6e7c4e50ab89b2e6ad9430bf47ba008a695ec2 100644 (file)
@@ -4,6 +4,7 @@ Required properties:
 - compatible: must be one of the following compatibles:
                - "allwinner,sun8i-a23-codec-analog"
                - "allwinner,sun8i-h3-codec-analog"
+               - "allwinner,sun8i-v3s-codec-analog"
 
 Required properties if not a sub-node of the PRCM node:
 - reg: must contain the registers location and length
index 29c4460681515a29e3f466891c3b83773944fcc8..485e79f292c48f7e92664d616b3bf28b74c92b1d 100644 (file)
@@ -810,6 +810,11 @@ static int sun8i_codec_analog_add_mixer(struct snd_soc_component *cmpnt,
        return 0;
 }
 
+static const struct sun8i_codec_analog_quirks sun8i_v3s_quirks = {
+       .has_headphone  = true,
+       .has_hmic       = true,
+};
+
 static int sun8i_codec_analog_cmpnt_probe(struct snd_soc_component *cmpnt)
 {
        struct device *dev = cmpnt->dev;
@@ -886,6 +891,10 @@ static const struct of_device_id sun8i_codec_analog_of_match[] = {
                .compatible = "allwinner,sun8i-h3-codec-analog",
                .data = &sun8i_h3_quirks,
        },
+       {
+               .compatible = "allwinner,sun8i-v3s-codec-analog",
+               .data = &sun8i_v3s_quirks,
+       },
        {}
 };
 MODULE_DEVICE_TABLE(of, sun8i_codec_analog_of_match);