[PATCH v9 4/5] gpio: rpmsg: add support for NXP legacy firmware protocol

Shenwei Wang shenwei.wang at nxp.com
Fri Mar 6 08:34:40 PST 2026



> -----Original Message-----
> From: Andrew Lunn <andrew at lunn.ch>
> Sent: Friday, March 6, 2026 8:24 AM
> To: Shenwei Wang <shenwei.wang at nxp.com>
> Cc: Linus Walleij <linusw at kernel.org>; Bartosz Golaszewski <brgl at kernel.org>;
> Jonathan Corbet <corbet at lwn.net>; Rob Herring <robh at kernel.org>; Krzysztof
> Kozlowski <krzk+dt at kernel.org>; Conor Dooley <conor+dt at kernel.org>; Bjorn
> Andersson <andersson at kernel.org>; Mathieu Poirier
> <mathieu.poirier at linaro.org>; Frank Li <frank.li at nxp.com>; Sascha Hauer
> <s.hauer at pengutronix.de>; arnaud.pouliquen at foss.st.com; Shuah Khan
> <skhan at linuxfoundation.org>; linux-gpio at vger.kernel.org; linux-
> doc at vger.kernel.org; linux-kernel at vger.kernel.org; Pengutronix Kernel Team
> <kernel at pengutronix.de>; Fabio Estevam <festevam at gmail.com>; Peng Fan
> <peng.fan at nxp.com>; devicetree at vger.kernel.org; linux-
> remoteproc at vger.kernel.org; imx at lists.linux.dev; linux-arm-
> kernel at lists.infradead.org; dl-linux-imx <linux-imx at nxp.com>
> 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



More information about the linux-arm-kernel mailing list