[PATCH v14 1/5] docs: driver-api: gpio: rpmsg gpio driver over rpmsg bus
Shenwei Wang (OSS)
shenwei.wang at oss.nxp.com
Tue Jul 14 14:10:01 PDT 2026
> -----Original Message-----
> From: Andrew Lunn <andrew at lunn.ch>
> Sent: Tuesday, July 14, 2026 3:23 PM
> To: Shenwei Wang (OSS) <shenwei.wang at oss.nxp.com>
> Cc: Mathieu Poirier <mathieu.poirier at linaro.org>; 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>; Frank Li <frank.li at nxp.com>; Sascha Hauer
> <s.hauer at pengutronix.de>; 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>; Shenwei Wang <shenwei.wang at nxp.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>; Arnaud
> POULIQUEN <arnaud.pouliquen at foss.st.com>; b-padhi at ti.com
> Subject: Re: [PATCH v14 1/5] docs: driver-api: gpio: rpmsg gpio driver over rpmsg
> bus
>
> > The two fields above are required for rpmsg-gpio, but not for virtio-gpio.
> >
> > In the rpmsg-gpio case, interrupt detection and handling occur on the
> > remote processor. The interrupt information (such as the GPIO line and
> > trigger type) must therefore be sent to Linux through this notification message.
> >
> > In contrast, for virtio-gpio, interrupt handling is performed on the
> > local processor. Since Linux already has all the necessary interrupt context, the
> information is not needed.
>
> Are you sure about that?
>
> virtio_gpio_irq_set_type() sets:
>
Why are you bringing up virtio_gpio_irq_set_type() here? The command path is already
fully aligned with the existing virtio-gpio implementation.
The gap we are discussing is the interrupt notification message coming from the remote side.
That is the topic under discussion.
Shenwei
> irq_line->type = type;
> irq_line->update_pending = true;
>
> virtio_gpio_irq_bus_sync_unlock() looks at update_pending and does
> virtio_gpio_req(), passing irq_line->type as type.
>
> This then gets filled into:
>
> /* Virtio GPIO Request / Response */
> struct virtio_gpio_request {
> __le16 type;
> __le16 gpio;
> __le32 value;
> };
>
> which gets scatter/gathered over the virtqueue to the peer.
>
> Andrew
More information about the linux-arm-kernel
mailing list