diff mbox series

[v3,2/7] ASoC: imx-audio-rpmsg: Create rpmsg channel for MICFIL

Message ID 20220930064441.2548505-3-chancel.liu@nxp.com (mailing list archive)
State Accepted
Commit f04189e0b85f6bbd10679e71061bf6d1ced5c539
Headers show
Series Create a new sound card to access MICFIL based on rpmsg channel | expand

Commit Message

Chancel Liu Sept. 30, 2022, 6:44 a.m. UTC
Rpmsg channel for MICFIL can also be created through rpmsg name service
announcement. If this driver is probed, Cortex-A can access MICFIL
which is actually controlled by Cortex-M through rpmsg channel for
MICFIL. This driver also helps register ASoC platform device thus use
of PLATFORM_DEVID_AUTO macro in API can automatically create device for
each rpmsg channel.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
 sound/soc/fsl/imx-audio-rpmsg.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Shengjiu Wang Oct. 9, 2022, 6:17 a.m. UTC | #1
On Fri, Sep 30, 2022 at 2:46 PM Chancel Liu <chancel.liu@nxp.com> wrote:

> Rpmsg channel for MICFIL can also be created through rpmsg name service
> announcement. If this driver is probed, Cortex-A can access MICFIL
> which is actually controlled by Cortex-M through rpmsg channel for
> MICFIL. This driver also helps register ASoC platform device thus use
> of PLATFORM_DEVID_AUTO macro in API can automatically create device for
> each rpmsg channel.
>
> Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
>

Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>

Best regards
Wang Shengjiu

> ---
>  sound/soc/fsl/imx-audio-rpmsg.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/sound/soc/fsl/imx-audio-rpmsg.c
> b/sound/soc/fsl/imx-audio-rpmsg.c
> index 905c3a071300..d5234ac4b09b 100644
> --- a/sound/soc/fsl/imx-audio-rpmsg.c
> +++ b/sound/soc/fsl/imx-audio-rpmsg.c
> @@ -88,7 +88,7 @@ static int imx_audio_rpmsg_probe(struct rpmsg_device
> *rpdev)
>         /* Register platform driver for rpmsg routine */
>         data->rpmsg_pdev = platform_device_register_data(&rpdev->dev,
>                                                          IMX_PCM_DRV_NAME,
> -
> PLATFORM_DEVID_NONE,
> +
> PLATFORM_DEVID_AUTO,
>                                                          NULL, 0);
>         if (IS_ERR(data->rpmsg_pdev)) {
>                 dev_err(&rpdev->dev, "failed to register rpmsg
> platform.\n");
> @@ -110,6 +110,7 @@ static void imx_audio_rpmsg_remove(struct rpmsg_device
> *rpdev)
>
>  static struct rpmsg_device_id imx_audio_rpmsg_id_table[] = {
>         { .name = "rpmsg-audio-channel" },
> +       { .name = "rpmsg-micfil-channel" },
>         { },
>  };
>
> --
> 2.25.1
>
>
diff mbox series

Patch

diff --git a/sound/soc/fsl/imx-audio-rpmsg.c b/sound/soc/fsl/imx-audio-rpmsg.c
index 905c3a071300..d5234ac4b09b 100644
--- a/sound/soc/fsl/imx-audio-rpmsg.c
+++ b/sound/soc/fsl/imx-audio-rpmsg.c
@@ -88,7 +88,7 @@  static int imx_audio_rpmsg_probe(struct rpmsg_device *rpdev)
 	/* Register platform driver for rpmsg routine */
 	data->rpmsg_pdev = platform_device_register_data(&rpdev->dev,
 							 IMX_PCM_DRV_NAME,
-							 PLATFORM_DEVID_NONE,
+							 PLATFORM_DEVID_AUTO,
 							 NULL, 0);
 	if (IS_ERR(data->rpmsg_pdev)) {
 		dev_err(&rpdev->dev, "failed to register rpmsg platform.\n");
@@ -110,6 +110,7 @@  static void imx_audio_rpmsg_remove(struct rpmsg_device *rpdev)
 
 static struct rpmsg_device_id imx_audio_rpmsg_id_table[] = {
 	{ .name	= "rpmsg-audio-channel" },
+	{ .name = "rpmsg-micfil-channel" },
 	{ },
 };