Commit 7eac1e24 authored by Trevor Wu's avatar Trevor Wu Committed by Mark Brown

ASoC: mt8195: correct the dts parsing logic about DPTX and HDMITX

According to the description in dt-bindings, phandle assignment of
HDMI TX and DP TX are not required properties, but driver regards them
as required properties.
In real use case, it's expected that DP TX and HDMI TX are optional
features, so correct the behavior in driver.

Fixes: 40d605df ("ASoC: mediatek: mt8195: add machine driver with mt6359, rt1019 and rt5682")
Signed-off-by: default avatarTrevor Wu <trevor.wu@mediatek.com>
Link: https://lore.kernel.org/r/20210903060049.20764-1-trevor.wu@mediatek.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent b3dded7e
...@@ -1018,13 +1018,12 @@ static int mt8195_mt6359_rt1019_rt5682_dev_probe(struct platform_device *pdev) ...@@ -1018,13 +1018,12 @@ static int mt8195_mt6359_rt1019_rt5682_dev_probe(struct platform_device *pdev)
of_parse_phandle(pdev->dev.of_node, of_parse_phandle(pdev->dev.of_node,
"mediatek,dptx-codec", 0); "mediatek,dptx-codec", 0);
if (!dai_link->codecs->of_node) { if (!dai_link->codecs->of_node) {
dev_err(&pdev->dev, "Property 'dptx-codec' missing or invalid\n"); dev_dbg(&pdev->dev, "No property 'dptx-codec'\n");
return -EINVAL; } else {
dai_link->codecs->name = NULL;
dai_link->codecs->dai_name = "i2s-hifi";
dai_link->init = mt8195_dptx_codec_init;
} }
dai_link->codecs->name = NULL;
dai_link->codecs->dai_name = "i2s-hifi";
dai_link->init = mt8195_dptx_codec_init;
} }
if (strcmp(dai_link->name, "ETDM3_OUT_BE") == 0) { if (strcmp(dai_link->name, "ETDM3_OUT_BE") == 0) {
...@@ -1032,13 +1031,12 @@ static int mt8195_mt6359_rt1019_rt5682_dev_probe(struct platform_device *pdev) ...@@ -1032,13 +1031,12 @@ static int mt8195_mt6359_rt1019_rt5682_dev_probe(struct platform_device *pdev)
of_parse_phandle(pdev->dev.of_node, of_parse_phandle(pdev->dev.of_node,
"mediatek,hdmi-codec", 0); "mediatek,hdmi-codec", 0);
if (!dai_link->codecs->of_node) { if (!dai_link->codecs->of_node) {
dev_err(&pdev->dev, "Property 'hdmi-codec' missing or invalid\n"); dev_dbg(&pdev->dev, "No property 'hdmi-codec'\n");
return -EINVAL; } else {
dai_link->codecs->name = NULL;
dai_link->codecs->dai_name = "i2s-hifi";
dai_link->init = mt8195_hdmi_codec_init;
} }
dai_link->codecs->name = NULL;
dai_link->codecs->dai_name = "i2s-hifi";
dai_link->init = mt8195_hdmi_codec_init;
} }
} }
......
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