Bartosz Golaszewski
30d15b8949
gpio: lp873x: use new GPIO line value setter callbacks
...
struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.
Link: https://lore.kernel.org/r/20250506-gpiochip-set-rv-gpio-part3-v1-1-0fbdea5a9667@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org >
2025-05-13 15:15:34 +02:00
Bartosz Golaszewski
6ac28cd232
Merge tag 'ib-mfd-gpio-nvmem-v6.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into gpio/for-next
...
Immutable branch between MFD, GPIO and NVMEM due for the v6.16 merge window
2025-05-13 15:11:12 +02:00
André Draszik
8824dc7f94
nvmem: max77759: Add Maxim MAX77759 NVMEM driver
...
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 exposes the non volatile memory using the platform device
registered by the core MFD driver.
Signed-off-by: André Draszik <andre.draszik@linaro.org >
Acked-by: Srinivas Kandagatla <srini@kernel.org >
Acked-by: Peter Griffin <peter.griffin@linaro.org >
Link: https://lore.kernel.org/r/20250509-max77759-mfd-v10-3-962ac15ee3ef@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org >
2025-05-09 15:23:18 +01:00
André Draszik
89a796b950
gpio: max77759: Add Maxim MAX77759 gpio driver
...
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-09 15:23:01 +01:00
André Draszik
bb71e40db1
mfd: max77759: Add Maxim MAX77759 core driver
...
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.
Fuel Gauge and TCPC have separate and independent I2C addresses,
register maps, and interrupt lines and are therefore excluded from the
MFD core device driver here.
The GPIO and NVMEM interfaces are accessed via specific commands to the
built-in microprocessor. This driver implements an API that client
drivers can use for accessing those.
Signed-off-by: André Draszik <andre.draszik@linaro.org >
Acked-by: Peter Griffin <peter.griffin@linaro.org >
Link: https://lore.kernel.org/r/20250509-max77759-mfd-v10-1-962ac15ee3ef@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org >
2025-05-09 15:22:30 +01:00
André Draszik
81fec13be9
dt-bindings: mfd: Add max77759 binding
...
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 describes the top-level device.
Signed-off-by: André Draszik <andre.draszik@linaro.org >
Reviewed-by: "Rob Herring (Arm)" <robh@kernel.org >
Link: https://lore.kernel.org/r/20250325-max77759-mfd-v6-3-c0870ca662ba@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org >
2025-05-09 15:22:13 +01:00
André Draszik
ee71546b81
dt-bindings: nvmem: Add max77759 binding
...
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 describes its storage module (NVMEM).
Signed-off-by: André Draszik <andre.draszik@linaro.org >
Reviewed-by: "Rob Herring (Arm)" <robh@kernel.org >
Link: https://lore.kernel.org/r/20250325-max77759-mfd-v6-2-c0870ca662ba@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org >
2025-05-09 15:21:56 +01:00
André Draszik
190b565788
dt-bindings: gpio: Add max77759 binding
...
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 describes its GPIO module.
Signed-off-by: André Draszik <andre.draszik@linaro.org >
Reviewed-by: "Rob Herring (Arm)" <robh@kernel.org >
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org >
Link: https://lore.kernel.org/r/20250325-max77759-mfd-v6-1-c0870ca662ba@linaro.org
Signed-off-by: Lee Jones <lee@kernel.org >
2025-05-09 15:21:35 +01:00
Arnd Bergmann
3a1e07184d
gpio: blzp1600: remove incorrect pf_match_ptr()
...
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-05-05 15:02:58 +02:00
Bartosz Golaszewski
127da457c4
gpio: lp3943: use new line value setter callbacks
...
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-30 10:27:59 +02:00
Bartosz Golaszewski
7d34d9fbab
gpio: loongson: use new line value setter callbacks
...
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-30 10:27:59 +02:00
Bartosz Golaszewski
145c4d7052
gpio: loongson-64bit: use new line value setter callbacks
...
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-30 10:27:58 +02:00
Bartosz Golaszewski
ba2ce44332
gpio: logicvc: use new line value setter callbacks
...
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-30 10:27:58 +02:00
Bartosz Golaszewski
722332f58a
gpio: ljca: use new line value setter callbacks
...
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-30 10:27:58 +02:00
Bartosz Golaszewski
0c5fa4ee5a
gpio: kempld: use new line value setter callbacks
...
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-30 10:27:58 +02:00
Bartosz Golaszewski
3444049044
gpio: janz-ttl: use new line value setter callbacks
...
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-30 10:27:58 +02:00
Bartosz Golaszewski
ef877a1590
gpio: it87: use new line value setter callbacks
...
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-30 10:27:58 +02:00
Bartosz Golaszewski
40150dda92
gpio: imx-scu: use new line value setter callbacks
...
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-30 10:27:58 +02:00
Bartosz Golaszewski
68ef71400d
gpio: imx-scu: destroy the mutex in detach path
...
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-30 10:27:58 +02:00
Bartosz Golaszewski
dd6d13abb4
gpio: imx-scu: use lock guards
...
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-30 10:27:58 +02:00
Bartosz Golaszewski
57bbc60be4
gpio: imx-scu: don't check the GPIO range
...
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-30 10:27:58 +02:00
Andy Shevchenko
d1d52c6622
gpiolib: devres: Finish the conversion to use devm_add_action()
...
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-28 09:41:04 +02:00
Bartosz Golaszewski
063a2b45d6
Merge tag 'gpiod-devm-is-action-added-for-v6.16-rc1' into gpio/for-next
...
Immutable tag for the driver core tree to pull from
devres: Move devm_*_action*() APIs to devres.h
devres: Add devm_is_action_added() helper
2025-04-28 09:40:53 +02:00
Andy Shevchenko
e383bb8f95
devres: Add devm_is_action_added() helper
...
In some code we would like to know if the action in device managed resources
was added by devm_add_action() family of calls. Introduce a helper for that.
Reviewed-by: Raag Jadav <raag.jadav@intel.com >
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Reviewed-by: Zijun Hu <quic_zijuhu@quicinc.com >
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/20250220162238.2738038-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org >
2025-04-28 09:30:41 +02:00
Andy Shevchenko
f5e5631df5
devres: Move devm_*_action*() APIs to devres.h
...
We have a newly created header linux/device/devres.h that gathers
device managed APIs, so users won't need to include entire device.h
for only these ones. Move devm_*_action*() APIs to devres.h as well.
Reviewed-by: Raag Jadav <raag.jadav@intel.com >
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com >
Reviewed-by: Zijun Hu <quic_zijuhu@quicinc.com >
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Link: https://lore.kernel.org/r/20250220162238.2738038-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org >
2025-04-28 09:30:40 +02:00
Potin Lai
417b0f8d08
gpio: pca953x: Add support for level-triggered interrupts
...
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-23 13:24:27 +02:00
Jindong Yue
73dc041f8a
gpio: vf610: Allow building as a module
...
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-23 13:23:18 +02:00
Nathan Chancellor
29f4c4da74
gpio: Restrict GPIO_ICH to compile testing with HAS_IOPORT
...
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: f3592d252f ("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-22 15:32:54 +02:00
Andy Shevchenko
550300b9a2
gpiolib: Remove redundant assignment of return variable
...
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-17 15:22:06 +02:00
Andy Shevchenko
7cc868831b
gpiolib: Reuse return variable in gpiod_to_irq()
...
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-17 15:22:06 +02:00
Andy Shevchenko
8c13e6a3d5
gpiolib: Call validate_desc() when VALIDATE_DESC() can't be used
...
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-17 15:22:06 +02:00
Andy Shevchenko
35d9bb5f79
gpiolib: Move validate_desc() and Co upper in the code
...
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-17 15:22:06 +02:00
Andy Shevchenko
df6dccb4ae
gpiolib: Revert "Don't WARN on gpiod_put() for optional GPIO"
...
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 1d7765ba15 .
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-17 15:22:05 +02:00
Andy Shevchenko
b709d676c1
gpiolib: Print actual error when descriptor contains an error pointer
...
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-17 15:22:05 +02:00
Andy Shevchenko
d4fe58c8ea
gpiolib: Convert to use guard()() for gpio_machine_hogs_mutex
...
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-17 15:22:05 +02:00
Andy Shevchenko
f1d6cd0774
gpiolib: Make taking gpio_lookup_lock consistent
...
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-17 15:22:05 +02:00
Yixun Lan
d00553240e
gpio: spacemit: add support for K1 SoC
...
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-17 15:22:05 +02:00
Yixun Lan
26bb7614fa
dt-bindings: gpio: spacemit: add support for K1 SoC
...
The GPIO controller of K1 support basic functions as input/output,
all pins can be used as interrupt which route to one IRQ line,
trigger type can be select between rising edge, falling edge, or both.
There are four GPIO banks, each consisting of 32 pins.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org >
Reviewed-by: Rob Herring (Arm) <robh@kernel.org >
Signed-off-by: Yixun Lan <dlan@gentoo.org >
Link: https://lore.kernel.org/r/20250412-03-k1-gpio-v8-1-1c6862d272ec@gentoo.org
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl >
2025-04-17 15:22:05 +02:00
Bartosz Golaszewski
4e8a72f9b7
gpio: tn48m: enable building the module with COMPILE_TEST=y
...
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-17 15:22:05 +02:00
Bartosz Golaszewski
3d1c5b6221
gpio: rtd: enable building the module with COMPILE_TEST=y
...
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-17 13:58:55 +02:00
Bartosz Golaszewski
bcb4be0907
gpio: pl061: enable building the module with COMPILE_TEST=y
...
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-17 13:58:55 +02:00
Bartosz Golaszewski
4675b78c88
gpio: msc313: enable building the module with COMPILE_TEST=y
...
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-17 13:58:55 +02:00
Bartosz Golaszewski
6273ef3560
gpio: zynq: enable building the modules with COMPILE_TEST=y
...
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-17 13:58:55 +02:00
Bartosz Golaszewski
d024e48263
gpio: blzp1600: drop dependency on OF headers
...
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-17 13:58:55 +02:00
Bartosz Golaszewski
df1540f8f3
gpio: ds4520: don't check the 'ngpios' property in the driver
...
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-17 13:58:55 +02:00
Bartosz Golaszewski
f74195d4b2
gpio: ich: use new line value setter callbacks
...
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-17 13:58:55 +02:00
Bartosz Golaszewski
f3592d252f
gpio: ich: enable building with COMPILE_TEST=y
...
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-17 13:58:55 +02:00
Bartosz Golaszewski
8416e1c971
gpio: htc-egpio: use new line value setter callbacks
...
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-17 13:58:54 +02:00
Bartosz Golaszewski
1791226b71
gpio: htc-egpio: enable building with COMPILE_TEST=y
...
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-17 13:58:54 +02:00
Bartosz Golaszewski
d170eef8d4
gpio: gw-pld: use new line value setter callbacks
...
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-17 13:58:54 +02:00