RE: [PATCH v14 1/5] docs: driver-api: gpio: rpmsg gpio driver over rpmsg bus
"Shenwei Wang (OSS)" <[email protected]> Tue, 14 Jul 2026 20:27:18 +0000
| Newsgroups | org.kernel.vger.linux-remoteproc,dev.linux.lists.imx,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-doc,org.kernel.vger.linux-gpio,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <PAXPR04MB91854BDD3FBE95DD5025AA0C89F92@PAXPR04MB9185.eurprd04.prod.outlook.com> |
> -----Original Message----- > From: Andrew Lunn <[email protected]> > Sent: Tuesday, July 14, 2026 3:13 PM > To: Shenwei Wang (OSS) <[email protected]> > Cc: Mathieu Poirier <[email protected]>; 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]>; Frank Li <[email protected]>; Sascha Hauer > <[email protected]>; Shuah Khan <[email protected]>; linux- > [email protected]; [email protected]; [email protected]; > Pengutronix Kernel Team <[email protected]>; Fabio Estevam > <[email protected]>; Shenwei Wang <[email protected]>; Peng Fan > <[email protected]>; [email protected]; linux- > [email protected]; [email protected]; linux-arm- > [email protected]; dl-linux-imx <[email protected]>; Arnaud > POULIQUEN <[email protected]>; [email protected] > 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