Unverified Commit 294a60e5 authored by Shengjiu Wang's avatar Shengjiu Wang Committed by Mark Brown
Browse files

ASoC: fsl_audmix: register card device depends on 'dais' property



In order to make the audmix device linked by audio graph card, make
'dais' property to be optional.

If 'dais' property exists, then register the imx-audmix card driver.
otherwise, it should be linked by audio graph card.

Signed-off-by: default avatarShengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20250226100508.2352568-5-shengjiu.wang@nxp.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 597acf1a
Loading
Loading
Loading
Loading
+11 −5
Original line number Diff line number Diff line
@@ -488,12 +488,18 @@ static int fsl_audmix_probe(struct platform_device *pdev)
		goto err_disable_pm;
	}

	/*
	 * If dais property exist, then register the imx-audmix card driver.
	 * otherwise, it should be linked by audio graph card.
	 */
	if (of_find_property(pdev->dev.of_node, "dais", NULL)) {
		priv->pdev = platform_device_register_data(dev, "imx-audmix", 0, NULL, 0);
		if (IS_ERR(priv->pdev)) {
			ret = PTR_ERR(priv->pdev);
			dev_err(dev, "failed to register platform: %d\n", ret);
			goto err_disable_pm;
		}
	}

	return 0;