Thread (69 messages) 69 messages, 8 authors, 2026-02-27

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

From: Linus Walleij <linusw@kernel.org>
Date: 2026-02-27 00:00:43
Also in: imx, linux-devicetree, linux-doc, linux-gpio, linux-remoteproc, lkml

On Wed, Feb 25, 2026 at 10:02 PM Bjorn Andersson [off-list ref] wrote:
quoted
Thanks for the explanation. If I’m understanding correctly, what you’re suggesting is
essentially a driver that merges the roles of a virtio_driver and an rpmsg_driver into a
single source file. There may be opportunities for a few function reuse, but overall it
would still result in a fairly distinct codebase.
Most of the non-boilerplate code in gpio-virtio would be impacted by
differences between rpmsg and virtio. So combining the two
implementations in a single source file would add complexity to an
otherwise straightforward driver, only with trivial parts reused.

My expectation is that it will be better to just have two separate
drivers - but reuse all the design-work done in the gpio-virtio.
I agree with Bjorn.

If there is indeed code to be reused, just create a library
module .c/.o/.h file and export the symbols. modprobe will
bring it in, Kconfig will configure it in if compiled in. One or the
other or both modules can use that. We do this
all over the place.

Yours,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help