Re: [PATCH 1/3] rust: gpio: add GPIO module with common definitions
From: Kohei Ito
Date: Sun Sep 06 2026 - 11:53:56 EST
Hi, Miguel and Gary,
On Sun, Sep 06, 2026 at 02:09:30PM +0100, Gary Guo wrote:
> On Sun Sep 6, 2026 at 10:56 AM BST, Miguel Ojeda wrote:
> > On Sun, Sep 6, 2026 at 10:46 AM Kohei Ito <koheiito.dev@xxxxxxxxx> wrote:
> >>
> >> Add the top-level GPIO module with minimal common definitions. This
> >> module is the basis for future Rust GPIO extensions.
> >
> > Thanks & welcome!
> >
> > I see you Cc'd linux-gpio, which is good, but the GPIO maintainers
> > should be Cc'd too, since they are the ones that will be deciding on
> > this -- doing it for you in this one so that they are in the loop.
Thank you for adding the GPIO maintainers. I'll make sure to Cc them in
future revisions.
> > By the way, it is nice to see GPIO again :) Now that some years have
> > passed, how does it compare to
> >
> > https://lwn.net/Articles/863459/
> >
> > ?
>
> This is possibily also a show case for all our I/O projection and register macro
> work :)
Thank you for the pointer. I was not aware of the past GPIO abstractions
[1].
As I understand it, the past GPIO work focused on the GPIO driver APIs
(`include/linux/gpio/driver.h`), i.e., for the drivers that provide GPIO
functionality, mostly present in `drivers/gpio`.
On the other hand, this series implements GPIO consumer APIs
(`include/linux/gpio/consumer.h`), i.e., for the drivers that use GPIOs,
such as `drivers/leds/leds-gpio.c` and `drivers/reset/reset-gpio.c`.
I assume that the GPIO driver abstractions will be implemented later in
`rust/kernel/gpio/driver.rs`.
[1] https://github.com/Rust-for-Linux/linux/blob/rust/rust/kernel/gpio.rs
(Current hash: 18b7491480025420896e0c8b73c98475c3806c6f)
Best regards,
Kohei Ito