Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp181302pxb; Thu, 2 Sep 2021 23:03:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKFjRlleXNtOhgzT9+wNLV7ToSEtMW5RMagRrQpz0u+7u39f9VotpZoBcMgwbqL3ePuBpN X-Received: by 2002:a17:906:a0c:: with SMTP id w12mr2254470ejf.376.1630648995064; Thu, 02 Sep 2021 23:03:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630648995; cv=none; d=google.com; s=arc-20160816; b=y1ifJ61YofJNbYYEJcUeRhJegN0iZEeGiRdPG5YaRAadW4npCeXbVX/f49T5rGcqKn nq9tshv4Psc59FRbFhvcrzpfebrQxuVBZlcwOscOX0JlJD97TJxO7/Oc05P/usFqansi PVT8+4MnJw3iMsWo8uScVZy4OKOh/M+tSnufV03/0FLGIc3wnccf1ky8E8B91WvLurt2 hBf5SjZnEmVQcogy7G4fuup8iwwp3ZvgFI66kX/h7GlucSnyp5uzE/wkXZU/o2h7cQNM /TfT/vnV29Vwj/i78Tt5os5h4NGNb847d9tciOCNx4L2ZgLI/GA7ttkQ30p7jfWbrZ/n +cWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=RxxPLB4eOetm+hZNhfmIxfW/36ospQkuP6uz3TbMBkI=; b=lo0RGnecbAT1+HOv+vwsLa9PoUHvn8SRcWTKSj9DGc7INwuV40GP7e3dTGs8orKBs+ QLa4d9hIN5fzSbMUn2xvfOs8rwFFYowuCjTeunrh1erEqvjZEmOBdWm4cqrjN9yUjtvR QSI0UxrH7RQ/FI/1Ay7kBZ70tbDyow/d7XXeF57XyBuauAmURM3vQHk2PeNTTumHyOut 9omhX/7K872Oyl5+VLuyqeU3jSZ+d/Th47fxGpuJG4kafMGsQ5L5fyqg6wy8ZermYM9+ Ec1RAkbsvbEIg4xgaip1OPTAd7PFyxPt+HMr+LUCGrreK7lnPJJLyd3Z0UPsYhuk4UMf GkiQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m14si4104019ejl.182.2021.09.02.23.02.47; Thu, 02 Sep 2021 23:03:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237226AbhICGCB (ORCPT + 99 others); Fri, 3 Sep 2021 02:02:01 -0400 Received: from mailgw01.mediatek.com ([60.244.123.138]:36574 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S236348AbhICGCA (ORCPT ); Fri, 3 Sep 2021 02:02:00 -0400 X-UUID: 45ec8858fcea4a23a0db6e31cc49a40a-20210903 X-UUID: 45ec8858fcea4a23a0db6e31cc49a40a-20210903 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-SHA384 256/256) with ESMTP id 1630697288; Fri, 03 Sep 2021 14:00:51 +0800 Received: from mtkcas11.mediatek.inc (172.21.101.40) by mtkmbs05n2.mediatek.inc (172.21.101.140) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Fri, 3 Sep 2021 14:00:50 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkcas11.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Fri, 3 Sep 2021 14:00:50 +0800 From: Trevor Wu To: , , CC: , , , , Subject: [PATCH] ASoC: mt8195: correct the dts parsing logic about DPTX and HDMITX Date: Fri, 3 Sep 2021 14:00:49 +0800 Message-ID: <20210903060049.20764-1-trevor.wu@mediatek.com> X-Mailer: git-send-email 2.18.0 MIME-Version: 1.0 Content-Type: text/plain X-MTK: N Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: 40d605df0a7b ("ASoC: mediatek: mt8195: add machine driver with mt6359, rt1019 and rt5682") Signed-off-by: Trevor Wu --- .../mt8195/mt8195-mt6359-rt1019-rt5682.c | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c b/sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c index 5dc217f59bd6..c97ace7387b4 100644 --- a/sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c +++ b/sound/soc/mediatek/mt8195/mt8195-mt6359-rt1019-rt5682.c @@ -1018,13 +1018,12 @@ static int mt8195_mt6359_rt1019_rt5682_dev_probe(struct platform_device *pdev) of_parse_phandle(pdev->dev.of_node, "mediatek,dptx-codec", 0); if (!dai_link->codecs->of_node) { - dev_err(&pdev->dev, "Property 'dptx-codec' missing or invalid\n"); - return -EINVAL; + dev_dbg(&pdev->dev, "No property 'dptx-codec'\n"); + } 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) { @@ -1032,13 +1031,12 @@ static int mt8195_mt6359_rt1019_rt5682_dev_probe(struct platform_device *pdev) of_parse_phandle(pdev->dev.of_node, "mediatek,hdmi-codec", 0); if (!dai_link->codecs->of_node) { - dev_err(&pdev->dev, "Property 'hdmi-codec' missing or invalid\n"); - return -EINVAL; + dev_dbg(&pdev->dev, "No property 'hdmi-codec'\n"); + } 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; } } -- 2.18.0