[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 13:27:18 PDT 2026
> -----Original Message-----
> From: Andrew Lunn <andrew at lunn.ch>
> Sent: Tuesday, July 14, 2026 3:13 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
>
> > > 1) You did not include messages that mask and unmask interrupts at
> > > the driver side.
> >
> > Interrupt masking and unmasking are handled entirely on the local processor.
> >
> > When an interrupt occurs, the remote system masks the interrupt and
> > then sends a notification to Linux. After Linux processes the
> > notification, it sends a SET_IRQ_TYPE message back to the remote system,
> which then unmasks the interrupt.
>
> Masking and unmasking an interrupt are orthogonal to the interrupt type.
>
> When the interrupt fires, the interrupt core calls the irq_mask() operation on the
> interrupt. That should mask the interrupt. Once the handler has finished, the
> interrupt core, will call irq_unmask() to unmask the interrupt.
>
> Edge, level, high, low, raising, falling has nothing to do with masking. Please don't
> mix concepts which Linux keeps separate.
>
That's how virtio-gpio is implemented. It uses a single command (MSG_IRQ_TYPE, 0x6) for
IRQ-related configuration, including masking, unmasking, and trigger type settings. Please
refer to gpio-virtio.c for the details.
Shenwei
> Andrew
More information about the linux-arm-kernel
mailing list