summaryrefslogtreecommitdiff
path: root/drivers/gpio
AgeCommit message (Collapse)AuthorFilesLines
2025-05-13gpio: virtuser: fix potential out-of-bound writeMarkus Burri1-2/+10
If the caller wrote more characters, count is truncated to the max available space in "simple_write_to_buffer". Check that the input size does not exceed the buffer size. Write a zero termination afterwards. Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202505091754.285hHbr2-lkp@intel.com/ Signed-off-by: Markus Burri <markus.burri@mt.com> Link: https://lore.kernel.org/r/20250509150459.115489-1-markus.burri@mt.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-05-13gpio: pca953x: fix IRQ storm on system wake upEmanuele Ghidoli1-0/+6
If an input changes state during wake-up and is used as an interrupt source, the IRQ handler reads the volatile input register to clear the interrupt mask and deassert the IRQ line. However, the IRQ handler is triggered before access to the register is granted, causing the read operation to fail. As a result, the IRQ handler enters a loop, repeatedly printing the "failed reading register" message, until `pca953x_resume()` is eventually called, which restores the driver context and enables access to registers. Fix by disabling the IRQ line before entering suspend mode, and re-enabling it after the driver context is restored in `pca953x_resume()`. An IRQ can be disabled with disable_irq() and still wake the system as long as the IRQ has wake enabled, so the wake-up functionality is preserved. Fixes: b76574300504 ("gpio: pca953x: Restore registers after suspend/resume cycle") Cc: stable@vger.kernel.org Signed-off-by: Emanuele Ghidoli <emanuele.ghidoli@toradex.com> Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20250512095441.31645-1-francesco@dolcini.it Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-05-09gpio: max77759: Add Maxim MAX77759 gpio driverAndré Draszik3-0/+544
The Maxim MAX77759 is a companion PMIC for USB Type-C applications and includes Battery Charger, Fuel Gauge, temperature sensors, USB Type-C Port Controller (TCPC), NVMEM, and a GPIO expander. This driver supports the GPIO functions using the platform device registered by the core MFD driver. Signed-off-by: André Draszik <andre.draszik@linaro.org> Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Acked-by: Peter Griffin <peter.griffin@linaro.org> Link: https://lore.kernel.org/r/20250509-max77759-mfd-v10-2-962ac15ee3ef@linaro.org Signed-off-by: Lee Jones <lee@kernel.org>
2025-05-05gpio: blzp1600: remove incorrect pf_match_ptr()Arnd Bergmann1-1/+1
The blzp1600_gpio_of_match is defined unconditionally and can always be referenced by the driver, so don't use of_match_ptr() and avoid this warning: drivers/gpio/gpio-blzp1600.c:263:34: error: 'blzp1600_gpio_of_match' defined but not used [-Werror=unused-const-variable=] 263 | static const struct of_device_id blzp1600_gpio_of_match[] = { Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/20250502203721.2117186-1-arnd@kernel.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-04-30gpio: lp3943: use new line value setter callbacksBartosz Golaszewski1-4/+9
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-12-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-04-30gpio: loongson: use new line value setter callbacksBartosz Golaszewski1-3/+5
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-11-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-04-30gpio: loongson-64bit: use new line value setter callbacksBartosz Golaszewski1-2/+4
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-10-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-04-30gpio: logicvc: use new line value setter callbacksBartosz Golaszewski1-6/+5
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-9-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-04-30gpio: ljca: use new line value setter callbacksBartosz Golaszewski1-4/+9
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-8-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-04-30gpio: kempld: use new line value setter callbacksBartosz Golaszewski1-2/+5
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-7-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-04-30gpio: janz-ttl: use new line value setter callbacksBartosz Golaszewski1-2/+4
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-6-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-04-30gpio: it87: use new line value setter callbacksBartosz Golaszewski1-4/+7
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-5-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-04-30gpio: imx-scu: use new line value setter callbacksBartosz Golaszewski1-2/+5
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-4-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-04-30gpio: imx-scu: destroy the mutex in detach pathBartosz Golaszewski1-1/+4
Use devm_mutex_init() in order to clean up after the mutex debug data in detach and error path. Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-3-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-04-30gpio: imx-scu: use lock guardsBartosz Golaszewski1-14/+12
Simplify the code by using lock guards from cleanup.h with the driver's mutex. Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-2-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-04-30gpio: imx-scu: don't check the GPIO rangeBartosz Golaszewski1-9/+0
Core GPIO code already does this for drivers, no need to duplicate the check. Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250423-gpiochip-set-rv-gpio-part2-v1-1-b22245cde81a@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-04-28gpiolib: devres: Finish the conversion to use devm_add_action()Andy Shevchenko1-65/+25
With a recently added helper we can complete the conversion of the GPIOLIB code to use devm_add_action() in all suitable cases. So do this. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/20250220162238.2738038-4-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-04-23gpio: pca953x: Add support for level-triggered interruptsPotin Lai1-5/+27
Adds support for level-triggered interrupts in the PCA953x GPIO expander driver. Previously, the driver only supported edge-triggered interrupts, which could lead to missed events in scenarios where an interrupt condition persists until it is explicitly cleared. By enabling level-triggered interrupts, the driver can now detect and respond to sustained interrupt conditions more reliably. Signed-off-by: Potin Lai <potin.lai.pt@gmail.com> Link: https://lore.kernel.org/r/20250409-gpio-pca953x-level-triggered-irq-v3-1-7f184d814934@gmail.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-04-23gpio: vf610: Allow building as a moduleJindong Yue2-2/+4
Support for building it as a module for use on the Android platform, because the Android kernel(GKI) doesn't contain board-specific drivers, it requires that these drivers be built as a module and loaded into the system. Signed-off-by: Jindong Yue <jindong.yue@nxp.com> Link: https://lore.kernel.org/r/20250416062605.1948856-1-jindong.yue@nxp.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-04-22gpio: Restrict GPIO_ICH to compile testing with HAS_IOPORTNathan Chancellor1-1/+1
When building gpio-ich.c for a platform that does not have IO port access like s390, there are several errors due to the use of inl() and outl() throughout the driver: drivers/gpio/gpio-ich.c: In function 'ichx_read_bit': include/asm-generic/io.h:578:14: error: call to '_inl' declared with attribute error: inl() requires CONFIG_HAS_IOPORT Only allow compile testing when the targeted platform selects HAS_IOPORT so that there are no compile time errors. Fixes: f3592d252f77 ("gpio: ich: enable building with COMPILE_TEST=y") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202504171941.g1yXja0j-lkp@intel.com/ Signed-off-by: Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/r/20250418-gpio-ich-fix-build-without-ioport-v1-1-83fc753438ec@kernel.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2025-04-17gpiolib: Remove redundant assignment of return variableAndy Shevchenko1-7/+6
In some functions the returned variable is assigned to 0 and then reassigned to the actual value. Remove redundant assignments. In one case make it more clear that the assignment is not needed. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20250416095645.2027695-9-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpiolib: Reuse return variable in gpiod_to_irq()Andy Shevchenko1-5/+4
There are two variables for the same used in the gpiod_to_irq(). Replace the second by reusing the function top-level one. While at it, refactor the branch to have less lines of code. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20250416095645.2027695-8-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpiolib: Call validate_desc() when VALIDATE_DESC() can't be usedAndy Shevchenko1-11/+5
Call validate_desc() directly when VALIDATE_DESC() can't be used. It will print additional information useful for debugging. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20250416095645.2027695-7-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpiolib: Move validate_desc() and Co upper in the codeAndy Shevchenko1-31/+31
Move validate_desc() and Co upper in the code to be able to use in the further changes. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20250416095645.2027695-6-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpiolib: Revert "Don't WARN on gpiod_put() for optional GPIO"Andy Shevchenko1-2/+1
No need to double check the pointer for NULL since gpiod_free() is using VALIDATE_DESC_VOID() which simply returns in that case. This reverts commit 1d7765ba15aca68f3bc52f59434c1c34855bbb54. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20250416095645.2027695-5-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpiolib: Print actual error when descriptor contains an error pointerAndy Shevchenko1-1/+1
Print the actual error when descriptor contains an error pointer. This might help debugging those rare cases. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20250416095645.2027695-4-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpiolib: Convert to use guard()() for gpio_machine_hogs_mutexAndy Shevchenko1-8/+4
The driver uses guard()()/scoped_guard() for the rest of the synchronisation calls. Convert to use the same for gpio_machine_hogs_mutex. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20250416095645.2027695-3-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpiolib: Make taking gpio_lookup_lock consistentAndy Shevchenko1-6/+2
There are two ways to take a lock: plain call to the mutex_lock() or using guard()() / scoped_guard(). The driver inconsistently uses both. Make taking gpio_lookup_lock consistent. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20250416095645.2027695-2-andriy.shevchenko@linux.intel.com Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpio: spacemit: add support for K1 SoCYixun Lan3-0/+303
Implement GPIO functionality which capable of setting pin as input, output. Also, each pin can be used as interrupt which support rising, falling, or both edge type trigger. Reviewed-by: Alex Elder <elder@riscstar.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Yixun Lan <dlan@gentoo.org> Link: https://lore.kernel.org/r/20250412-03-k1-gpio-v8-2-1c6862d272ec@gentoo.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpio: tn48m: enable building the module with COMPILE_TEST=yBartosz Golaszewski1-1/+1
Extend the build coverage by allowing to build the module with COMPILE_TEST enabled. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250408-gpio-compile-test-v1-6-140e108e9392@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpio: rtd: enable building the module with COMPILE_TEST=yBartosz Golaszewski1-1/+1
Extend the build coverage by allowing to build the module with COMPILE_TEST enabled. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250408-gpio-compile-test-v1-4-140e108e9392@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpio: pl061: enable building the module with COMPILE_TEST=yBartosz Golaszewski1-1/+1
Extend the build coverage by allowing to build the module with COMPILE_TEST enabled. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250408-gpio-compile-test-v1-3-140e108e9392@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpio: msc313: enable building the module with COMPILE_TEST=yBartosz Golaszewski1-1/+1
Extend the build coverage by allowing to build the module with COMPILE_TEST enabled. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250408-gpio-compile-test-v1-2-140e108e9392@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpio: zynq: enable building the modules with COMPILE_TEST=yBartosz Golaszewski1-2/+2
Extend the build coverage by allowing to build the modules with COMPILE_TEST enabled. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250408-gpio-compile-test-v1-1-140e108e9392@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpio: blzp1600: drop dependency on OF headersBartosz Golaszewski1-4/+2
Use the generic boolean device property getter instead of the OF-specific variant. This allows us to stop pulling in linux/of.h. While at it: drop the of_irq.h inclusion as none of its symbols are used in this driver. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com> Link: https://lore.kernel.org/r/20250408143629.125576-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpio: ds4520: don't check the 'ngpios' property in the driverBartosz Golaszewski1-6/+0
This is already done by the gpio-regmap abstraction by calling gpiochip_get_ngpios(). We don't need to do this at the driver level. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20250408-gpio-regmap-ngpios-v2-1-26f254014f57@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpio: ich: use new line value setter callbacksBartosz Golaszewski1-4/+8
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-12-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpio: ich: enable building with COMPILE_TEST=yBartosz Golaszewski1-2/+1
Extend the build coverage by allowing to build the module with COMPILE_TEST enabled. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-11-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpio: htc-egpio: use new line value setter callbacksBartosz Golaszewski1-8/+8
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-10-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpio: htc-egpio: enable building with COMPILE_TEST=yBartosz Golaszewski1-1/+1
Extend the build coverage by allowing to build the module with COMPILE_TEST enabled. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-9-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpio: gw-pld: use new line value setter callbacksBartosz Golaszewski1-3/+3
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-8-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpio: graniterapids: use new line value setter callbacksBartosz Golaszewski1-3/+3
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-7-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-17gpio: f7188: use new line value setter callbacksBartosz Golaszewski1-4/+9
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-6-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-16gpio: exar: use new line value setter callbacksBartosz Golaszewski1-7/+9
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-4-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-16gpio: em: use new line value setter callbacksBartosz Golaszewski1-2/+4
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-3-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-16gpio: eic-sprd: use new line value setter callbacksBartosz Golaszewski1-2/+3
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-2-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-16gpio: dln2: use new line value setter callbacksBartosz Golaszewski1-3/+4
struct gpio_chip now has callbacks for setting line values that return an integer, allowing to indicate failures. Convert the driver to using them. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Link: https://lore.kernel.org/r/20250407-gpiochip-set-rv-gpio-part1-v1-1-78399683ca38@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-14gpio: GPIO_BLZP1600 should depend on ARCH_BLAIZEGeert Uytterhoeven1-0/+1
The Blaize BLZP1600 GPIO controller is only present on BLaize BLZP1600 SoCs. Hence add a dependency on ARCH_BLAIZE, to prevent asking the user about this driver when configuring a kernel without Blaize platform support. Fixes: 602ae04f56542d8e ("gpio: Enable Blaize BLZP1600 GPIO support") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Nikolaos Pasaloukos <nikolaos.pasaloukos@blaize.com> Link: https://lore.kernel.org/r/a75af4b623579a193b4a59350c063969aabb5b71.1744190524.git.geert+renesas@glider.be Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-14gpio: aggregator: Fix leak in gpio_aggregator_parse()Dan Carpenter1-1/+1
Call gpio_aggregator_free_lines() before returning on this error path. Fixes: 83c8e3df642f ("gpio: aggregator: expose aggregator created via legacy sysfs to configfs") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Koichiro Den <koichiro.den@canonical.com> Link: https://lore.kernel.org/r/e023bfe52509ce1bef6209ec7c47e99279c551dd.1744452787.git.dan.carpenter@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
2025-04-14gpio: aggregator: Fix error code in gpio_aggregator_activate()Dan Carpenter1-1/+3
Propagate the error code if gpio_aggregator_make_device_sw_node() fails. Don't return success. Fixes: 86f162e73d2d ("gpio: aggregator: introduce basic configfs interface") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Koichiro Den <koichiro.den@canonical.com> Link: https://lore.kernel.org/r/79b804a0769a434698616bebedacc0e5d5605fdc.1744452787.git.dan.carpenter@linaro.org Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>