[PATCH] gpio-nct5104d: switch to dynamic gpio allocation

James Buren braewoods at braewoods.net
Fri Oct 16 06:01:14 PDT 2026


On Fri, 16 Oct 2026 14:56:17 +0200
Robert Marko <robimarko at gmail.com> wrote:

> On Fri, 16 Oct 2026 at 14:37, James Buren
> <braewoods+mgh at braewoods.net> wrote:
> >
> > The kernel complains about this module using a static GPIO base
> > address when it is inserted, calling it a deprecated feature. This
> > commit switches the GPIO base address to -1 for all instances of
> > struct gpio_chip, which is what enables dynamically allocated GPIO
> > base addresses, the feature intended to replace the static
> > allocation that was previously used.
> >
> > Furthermore, each GPIO bank was also given a new label that allows a
> > specific bank to be referenced via a unique label since the static
> > base address is no longer usable to identify a specific bank. This
> > brings this module into line with how the new GPIO subsystem
> > exposes GPIO providers to userspace and the rest of the kernel.
> >
> > Consequently, this means that existing userspace software will
> > break if they were using this module. The GPIO of this module can
> > still be accessed via the ioctl APIs for gpiochip devices, and also
> > the libgpiod userspace library and tools that were written for this
> > new GPIO API.
> >
> > The legacy sysfs GPIO interface is still usable, as long as you
> > look up the new dynamic GPIO base address that is exposed in this
> > module's sysfs entries. All this can be found under
> > /sys/class/gpio. You just need to look up the gpiochip you are
> > using by its label, extract its base address, add your line number
> > offset to it, and you can export it like was previously done.
> >
> > Signed-off-by: James Buren <braewoods+mgh at braewoods.net>
> 
> Hi,
> No need to send this a patch, as you already have a PR open.
> 
> Regards,
> Robert

Understood. I was advised to try submitting here from someone on IRC as
it was my first time submitting anything to OpenWRT.



More information about the openwrt-devel mailing list