mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-27 14:14:24 +08:00
ASoC: imx-rpmsg: Assign platform driver used by machine driver to link with
Each ASoC platform driver is named by rpmsg channel. ASoC machine driver can parse "fsl,rpmsg-channel-name" property to figure out which ASoC platform driver it should link with. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com> Link: https://lore.kernel.org/r/20220930064441.2548505-8-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
f26c1bb8a8
commit
4b48440ea3
@ -58,6 +58,7 @@ static int imx_rpmsg_probe(struct platform_device *pdev)
|
|||||||
struct platform_device *rpmsg_pdev = to_platform_device(dev);
|
struct platform_device *rpmsg_pdev = to_platform_device(dev);
|
||||||
struct device_node *np = rpmsg_pdev->dev.of_node;
|
struct device_node *np = rpmsg_pdev->dev.of_node;
|
||||||
struct of_phandle_args args;
|
struct of_phandle_args args;
|
||||||
|
const char *platform_name;
|
||||||
struct imx_rpmsg *data;
|
struct imx_rpmsg *data;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
@ -109,7 +110,10 @@ static int imx_rpmsg_probe(struct platform_device *pdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
data->dai.cpus->dai_name = dev_name(&rpmsg_pdev->dev);
|
data->dai.cpus->dai_name = dev_name(&rpmsg_pdev->dev);
|
||||||
data->dai.platforms->name = IMX_PCM_DRV_NAME;
|
if (!of_property_read_string(np, "fsl,rpmsg-channel-name", &platform_name))
|
||||||
|
data->dai.platforms->name = platform_name;
|
||||||
|
else
|
||||||
|
data->dai.platforms->name = "rpmsg-audio-channel";
|
||||||
data->dai.playback_only = true;
|
data->dai.playback_only = true;
|
||||||
data->dai.capture_only = true;
|
data->dai.capture_only = true;
|
||||||
data->card.num_links = 1;
|
data->card.num_links = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user