> -----Original Message-----
> From: Andrew Lunn <[email protected]>
> Sent: Friday, March 6, 2026 8:24 AM
> To: Shenwei Wang <[email protected]>
> Cc: Linus Walleij <[email protected]>; Bartosz Golaszewski <[email protected]>;
> Jonathan Corbet <[email protected]>; Rob Herring <[email protected]>; Krzysztof
> Kozlowski <[email protected]>; Conor Dooley <[email protected]>; Bjorn
> Andersson <[email protected]>; Mathieu Poirier
> <[email protected]>; Frank Li <[email protected]>; Sascha Hauer
> <[email protected]>; [email protected]; Shuah Khan
> <[email protected]>; [email protected]; linux-
> [email protected]; [email protected]; Pengutronix Kernel Team
> <[email protected]>; Fabio Estevam <[email protected]>; Peng Fan
> <[email protected]>; [email protected]; linux-
> [email protected]; [email protected]; linux-arm-
> [email protected]; dl-linux-imx <[email protected]>
> Subject: [EXT] Re: [PATCH v9 4/5] gpio: rpmsg: add support for NXP legacy
> firmware protocol
> > +static struct rpmsg_gpio_fixed_up imx_fixed_up_data = {
> > + .recv_fixed_up = rpmsg_gpio_imx_recv_fixed_up,
> > + .send_fixed_up = rpmsg_gpio_imx_send_fixed_up, };
> > +
> > static int rpmsg_gpio_send_message(struct rpmsg_gpio_port *port,
> > struct rpmsg_gpio_packet *msg,
> > bool sync) @@ -572,6 +711,10 @@
> > static const struct of_device_id rpmsg_gpio_dt_ids[] = {
> >
> > static struct rpmsg_device_id rpmsg_gpio_channel_id_table[] = {
> > { .name = "rpmsg-io" },
> > + {
> > + .name = "rpmsg-io-channel",
> > + .driver_data = (kernel_ulong_t)(uintptr_t)&imx_fixed_up_data
> > + },
>
> Its not clear to me how this gets applied. Don't you need a different
> compatible?
> fsl,rpmsg-gpio-legacy or something?
>
This is not a compatible. It is the RPMSG channel name advertised by the remote
processor.
The generic implementation uses "rpmsg-io" as the channel name, and
"rpmsg-io-channel" is
used by NXP's existing firmware.
> I would also put it behind a CONFIG_ option, and in a different module. Nobody
> needs this code other than your legacy products. You don't need the bloat for
> your new devices and other vendors don't need it.
>
Other vendors may add fixed up handlers in the same way to support their
existing products.
Thanks,
Shenwei
> Andrew