From: Andrew Lunn <andrew@lunn.ch>
To: Arnaud POULIQUEN <arnaud.pouliquen@foss.st.com>
Cc: Shenwei Wang <shenwei.wang@nxp.com>,
Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
Jonathan Corbet <corbet@lwn.net>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Frank Li <Frank.Li@nxp.com>,
Sascha Hauer <s.hauer@pengutronix.de>,
Shuah Khan <skhan@linuxfoundation.org>,
linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>, Peng Fan <peng.fan@nxp.com>,
devicetree@vger.kernel.org, linux-remoteproc@vger.kernel.org,
imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-imx@nxp.com, Bartosz Golaszewski <brgl@bgdev.pl>
Subject: Re: [PATCH v12 3/5] gpio: rpmsg: add generic rpmsg GPIO driver
Date: Tue, 17 Mar 2026 15:11:46 +0100 [thread overview]
Message-ID: <104e9861-bfd4-4e0f-8967-a849edf7e6fb@lunn.ch> (raw)
In-Reply-To: <2aa1d063-181f-4145-9f1f-7e3012c4d0af@foss.st.com>
> > +struct rpmsg_gpio_info {
> > + struct rpmsg_device *rpdev;
> > + struct rpmsg_gpio_packet *reply_msg;
> > + struct completion cmd_complete;
> > + struct mutex lock;
> > + void **port_store;
> > +};
>
> Except if I missunderstood Mathieu and Bjorn's request:
> "reuse all the design-work done in the gpio-virtio"
> We should find similar structures here to those defined
> in virtio_gpio.h.
> struct rpmsg_gpio_config {
> __le16 ngpio;
> __u8 padding[2];
> __le32 gpio_names_size;
> };
>
> /* Virtio GPIO Request / Response */
> struct virtio_gpio_request {
> __le16 type;
> __le16 gpio;
> __le32 value;
> };
The core of the issue is that Shenwei is stone walling any change
which makes it hard to keep the legacy firmware. It is possible to use
these structures, but it makes the extra code Shenwei needs to
translate this protocol to the legacy protocol more difficult. It
might need to keep state, etc.
Two points...
The firmware implements more than GPIO. There is definitely I2C as
well, the first version of the patch has bits of I2C code. Looking at:
https://lwn.net/ml/all/20250922200413.309707-3-shenwei.wang@nxp.com/
There is also RTC, and a few other things which don't directly map to
Linux subsystems, but maybe do have Linux drivers?
Give how much pushback there has been on the existing protocol for
GPIO, it would be wise to assume that I2C, and RTC is going to get the
same amount of pushback. If any of these three, GPIO, I2C, or RTC
decide that only a new, clean protocol will be accepted, no legacy
shims, the firmware has to change, breaking compatibility to legacy
protocols, and the accepted shims become pointless Maintenance burden.
Point two is that the customers who are pushing for these drivers to
be added to Mainline probably know that nearly nothing gets into
Mainline without some changes. There is some short term pain to
swapping to Mainline because of these changes, in this case, firmware
upgrades. But in the long run, it is worth the pain to be able to use
Mainline. And those customers who don't want to upgrade the firmware
can keep with the out of tree drives.
So, what are our choices?
1) We accept the code as it is now, with the shim?
2) We keep pushing for the virtio protocol, with the shim?
3) We keep pushing for the virtio protocol, no shim, firmware changes
4) We pause GPIO where it is today, and restart all the arguments with
the I2C driver. We can come back to the GPIO driver in a few months
time once we have a better idea how I2C is going. And maybe we also
need to see the watchdog driver, and argue about its protocol.
I also understand ST has a generic I2C driver nearly ready, if that
gets merged first, that probably kills the NXP I2C protocol, and maybe
the NXP GPIO and RTC protocols.
My vote is for 3. If not 3, then 4.
Andrew
next prev parent reply other threads:[~2026-03-17 14:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 19:57 [PATCH v12 0/5] Enable Remote GPIO over RPMSG on i.MX Platform Shenwei Wang
2026-03-13 19:57 ` [PATCH v12 1/5] docs: driver-api: gpio: rpmsg gpio driver over rpmsg bus Shenwei Wang
2026-03-13 19:57 ` [PATCH v12 2/5] dt-bindings: remoteproc: imx_rproc: Add "rpmsg" subnode support Shenwei Wang
2026-03-13 19:57 ` [PATCH v12 3/5] gpio: rpmsg: add generic rpmsg GPIO driver Shenwei Wang
2026-03-17 8:56 ` Arnaud POULIQUEN
2026-03-17 14:11 ` Andrew Lunn [this message]
2026-03-17 16:16 ` Shenwei Wang
2026-03-18 16:03 ` Mathieu Poirier
2026-03-18 18:45 ` Shenwei Wang
2026-03-18 19:03 ` Mathieu Poirier
2026-03-18 20:11 ` Andrew Lunn
2026-03-18 20:31 ` Shenwei Wang
2026-03-20 13:23 ` Linus Walleij
2026-03-17 14:22 ` Andrew Lunn
2026-03-17 15:59 ` Shenwei Wang
2026-03-17 16:40 ` Shenwei Wang
2026-03-23 13:51 ` Shenwei Wang
2026-03-13 19:58 ` [PATCH v12 4/5] gpio: rpmsg: add support for NXP legacy firmware protocol Shenwei Wang
2026-03-13 19:58 ` [PATCH v12 5/5] arm64: dts: imx8ulp: Add rpmsg node under imx_rproc Shenwei Wang
2026-03-16 14:23 ` [PATCH v12 0/5] Enable Remote GPIO over RPMSG on i.MX Platform Linus Walleij
2026-03-16 16:00 ` Mathieu Poirier
2026-03-19 13:43 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=104e9861-bfd4-4e0f-8967-a849edf7e6fb@lunn.ch \
--to=andrew@lunn.ch \
--cc=Frank.Li@nxp.com \
--cc=andersson@kernel.org \
--cc=arnaud.pouliquen@foss.st.com \
--cc=brgl@bgdev.pl \
--cc=brgl@kernel.org \
--cc=conor+dt@kernel.org \
--cc=corbet@lwn.net \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=peng.fan@nxp.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shenwei.wang@nxp.com \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox