Message ID | 20250407-gpiochip-set-rv-gpio-part1-v1-0-78399683ca38@linaro.org |
---|---|
Headers | show |
Series | gpio: convert more GPIO chips to using new value setters | expand |
On Mon, Apr 07, 2025 at 09:13:10AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > struct gpio_chip now has callbacks for setting line values that return > an integer, allowing to indicate failures. Convert the driver to using > them. ... > -static void dln2_gpio_set(struct gpio_chip *chip, unsigned offset, int value) > +static int dln2_gpio_set(struct gpio_chip *chip, unsigned int offset, > + int value) It gets even shorter. If you are fan of 80 characters from last decade, it still fits.
On Mon, Apr 07, 2025 at 09:13:20AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Extend the build coverage by allowing to build the module with > COMPILE_TEST enabled. ... > config GPIO_ICH > tristate "Intel ICH GPIO" > - depends on X86 > - depends on LPC_ICH > + depends on (X86 && LPC_ICH) || COMPILE_TEST I don't see why LPC_ICH should be here. We do all-or-none approach for compile test for (x86) MFD drivers, no need to test it separately (it makes a little sense). depends on X86 || COMPILE_TEST depends on LPC_ICH
On Mon, Apr 07, 2025 at 09:13:14AM +0200, Bartosz Golaszewski wrote: > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> > > Extend the build coverage by allowing the port-mapped drivers to be > build with COMPILE_TEST enabled. ... > menu "Port-mapped I/O GPIO drivers" > - depends on X86 && HAS_IOPORT # I/O space access > + depends on (X86 && HAS_IOPORT) || COMPILE_TEST # I/O space access Are you sure about this? Do we have IO accessor stubs? I don't remember that. What about depends on HAS_IOPORT # I/O space access depends on X86 || COMPILE_TEST instead?
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. We're in the process of converting all GPIO drivers to using the new API. This series converts another round of GPIO controllers. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> --- Bartosz Golaszewski (12): gpio: dln2: use new line value setter callbacks gpio: eic-sprd: use new line value setter callbacks gpio: em: use new line value setter callbacks gpio: exar: use new line value setter callbacks gpio: allow building port-mapped GPIO drivers with COMPILE_TEST=y gpio: f7188: use new line value setter callbacks gpio: graniterapids: use new line value setter callbacks gpio: gw-pld: use new line value setter callbacks gpio: htc-egpio: enable building with COMPILE_TEST=y gpio: htc-egpio: use new line value setter callbacks gpio: ich: enable building with COMPILE_TEST=y gpio: ich: use new line value setter callbacks drivers/gpio/Kconfig | 7 +++---- drivers/gpio/gpio-dln2.c | 7 ++++--- drivers/gpio/gpio-eic-sprd.c | 5 +++-- drivers/gpio/gpio-em.c | 6 ++++-- drivers/gpio/gpio-exar.c | 16 +++++++++------- drivers/gpio/gpio-f7188x.c | 13 +++++++++---- drivers/gpio/gpio-graniterapids.c | 6 +++--- drivers/gpio/gpio-gw-pld.c | 6 +++--- drivers/gpio/gpio-htc-egpio.c | 16 ++++++++-------- drivers/gpio/gpio-ich.c | 12 ++++++++---- 10 files changed, 54 insertions(+), 40 deletions(-) --- base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8 change-id: 20250326-gpiochip-set-rv-gpio-part1-ffdf7af68a3b Best regards,