Re: [PATCH v8 3/4] gpio: rpmsg: add generic rpmsg GPIO driver

From: Shenwei Wang

Date: Tue Feb 24 2026 - 15:33:18 EST




> -----Original Message-----
> From: Andrew Lunn <andrew@xxxxxxx>
> Sent: Tuesday, February 24, 2026 12:27 PM
> To: Shenwei Wang <shenwei.wang@xxxxxxx>
> Cc: Arnaud POULIQUEN <arnaud.pouliquen@xxxxxxxxxxx>; Linus Walleij
> <linusw@xxxxxxxxxx>; Bartosz Golaszewski <brgl@xxxxxxxxxx>; Jonathan Corbet
> <corbet@xxxxxxx>; Rob Herring <robh@xxxxxxxxxx>; Krzysztof Kozlowski
> <krzk+dt@xxxxxxxxxx>; Conor Dooley <conor+dt@xxxxxxxxxx>; Bjorn Andersson
> <andersson@xxxxxxxxxx>; Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>; Frank Li
> <frank.li@xxxxxxx>; Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>; Shuah Khan
> <skhan@xxxxxxxxxxxxxxxxxxx>; linux-gpio@xxxxxxxxxxxxxxx; linux-
> doc@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx; Pengutronix Kernel Team
> <kernel@xxxxxxxxxxxxxx>; Fabio Estevam <festevam@xxxxxxxxx>; Peng Fan
> <peng.fan@xxxxxxx>; devicetree@xxxxxxxxxxxxxxx; linux-
> remoteproc@xxxxxxxxxxxxxxx; imx@xxxxxxxxxxxxxxx; linux-arm-
> kernel@xxxxxxxxxxxxxxxxxxx; dl-linux-imx <linux-imx@xxxxxxx>; Bartosz
> Golaszewski <brgl@xxxxxxxx>
> Subject: [EXT] Re: [PATCH v8 3/4] gpio: rpmsg: add generic rpmsg GPIO driver
>
> Caution: This is an external email. Please take care when clicking links or opening
> attachments. When in doubt, report the message using the 'Report this email'
> button
>
>
> > Regarding type, it’s needed, especially for the in packets. There are
> > two distinct kinds of incoming
> > packets: notification‑in and reply‑in. Because of that differences,
> > Combining cmd and type would blur that distinction and complicate the
> implementation.
>
> [Goes and looks at gpio-virtio]
>

They aren’t comparable. gpio‑virtio represents a single virtio device(transport) mapped to a single
GPIO controller — a strict 1:1 relationship.

RPMSG, on the other hand, is a bus‑style transport. Multiple GPIO controllers can run over
the same RPMSG channel.

Thanks,
Shenwei

> https://elixir.bootl/
> in.com%2Flinux%2Fv6.19.3%2Fsource%2Finclude%2Fuapi%2Flinux%2Fvirtio_gpio
> .h%23L13&data=05%7C02%7Cshenwei.wang%40nxp.com%7C59d9438500554b
> 9d6a5e08de73d246cb%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C
> 639075544153317722%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRy
> dWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D
> %3D%7C0%7C%7C%7C&sdata=7fcyGY6KVuRqTIivhZbM4PK8PNTALI%2BScOfxM
> yaPVh8%3D&reserved=0
>
> /* Virtio GPIO request types */
> #define VIRTIO_GPIO_MSG_GET_NAMES 0x0001
> #define VIRTIO_GPIO_MSG_GET_DIRECTION 0x0002
> #define VIRTIO_GPIO_MSG_SET_DIRECTION 0x0003
> #define VIRTIO_GPIO_MSG_GET_VALUE 0x0004
> #define VIRTIO_GPIO_MSG_SET_VALUE 0x0005
> #define VIRTIO_GPIO_MSG_IRQ_TYPE 0x0006
>
> Andrew