Commit 2cfeaec0 authored by Icenowy Zheng's avatar Icenowy Zheng Committed by Mark Brown

ASoC: sun8i-codec-analog: add support for V3s SoC

The V3s SoC features an analog codec with headphone support but without
mic2 and linein.

Add support for it.
Signed-off-by: default avatarIcenowy Zheng <icenowy@aosc.xyz>
Reviewed-by: default avatarChen-Yu Tsai <wens@csie.org>
Acked-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 50aadc14
...@@ -4,6 +4,7 @@ Required properties: ...@@ -4,6 +4,7 @@ Required properties:
- compatible: must be one of the following compatibles: - compatible: must be one of the following compatibles:
- "allwinner,sun8i-a23-codec-analog" - "allwinner,sun8i-a23-codec-analog"
- "allwinner,sun8i-h3-codec-analog" - "allwinner,sun8i-h3-codec-analog"
- "allwinner,sun8i-v3s-codec-analog"
Required properties if not a sub-node of the PRCM node: Required properties if not a sub-node of the PRCM node:
- reg: must contain the registers location and length - reg: must contain the registers location and length
......
...@@ -810,6 +810,11 @@ static int sun8i_codec_analog_add_mixer(struct snd_soc_component *cmpnt, ...@@ -810,6 +810,11 @@ static int sun8i_codec_analog_add_mixer(struct snd_soc_component *cmpnt,
return 0; 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) static int sun8i_codec_analog_cmpnt_probe(struct snd_soc_component *cmpnt)
{ {
struct device *dev = cmpnt->dev; struct device *dev = cmpnt->dev;
...@@ -886,6 +891,10 @@ static const struct of_device_id sun8i_codec_analog_of_match[] = { ...@@ -886,6 +891,10 @@ static const struct of_device_id sun8i_codec_analog_of_match[] = {
.compatible = "allwinner,sun8i-h3-codec-analog", .compatible = "allwinner,sun8i-h3-codec-analog",
.data = &sun8i_h3_quirks, .data = &sun8i_h3_quirks,
}, },
{
.compatible = "allwinner,sun8i-v3s-codec-analog",
.data = &sun8i_v3s_quirks,
},
{} {}
}; };
MODULE_DEVICE_TABLE(of, sun8i_codec_analog_of_match); MODULE_DEVICE_TABLE(of, sun8i_codec_analog_of_match);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment