Skip to contentSkip to conversation

gpio: xilinx: convert set_multiple() to the new API as well

PATCH Applied Bartosz Golaszewski 2 participants 3 messages Jul 17, 2025 – Jul 18, 2025

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: xilinx: convert set_multiple() to the new API as well

From: Bartosz Golaszewski <[email protected]>

The patch converting the driver to using new GPIO line value setters only converted the set() callback and missed set_multiple(). Fix it now.

Fixes 1919ea19a4ff ("gpio: xilinx: use new GPIO line value setter callbacks")
---
 drivers/gpio/gpio-xilinx.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpio/gpio-xilinx.c +5 -3
index aaaa74117980..36d91cacc2d9 100644
@@ -175,8 +175,8 @@ static int xgpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
  * This function writes the specified values into the specified signals of the
  * GPIO devices.
  */
-static void xgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
-			       unsigned long *bits)
+static int xgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
+			      unsigned long *bits)
 {
 	DECLARE_BITMAP(hw_mask, 64);
 	DECLARE_BITMAP(hw_bits, 64);
@@ -196,6 +196,8 @@ static void xgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
 	bitmap_copy(chip->state, state, 64);
 
 	raw_spin_unlock_irqrestore(&chip->gpio_lock, flags);
+
+	return 0;
 }
 
 /**
@@ -605,7 +607,7 @@ static int xgpio_probe(struct platform_device *pdev)
 	chip->gc.set_rv = xgpio_set;
 	chip->gc.request = xgpio_request;
 	chip->gc.free = xgpio_free;
-	chip->gc.set_multiple = xgpio_set_multiple;
+	chip->gc.set_multiple_rv = xgpio_set_multiple;
 
 	chip->gc.label = dev_name(dev);
 
Signature · 1 line
2.48.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 36 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

The patch converting the driver to using new GPIO line value setters only converted the set() callback and missed set_multiple(). Fix it now.

Fixes 1919ea19a4ff ("gpio: xilinx: use new GPIO line value setter callbacks")
---
  drivers/gpio/gpio-xilinx.c | 8 +++++---
  1 file changed, 5 insertions(+), 3 deletions(-)
drivers/gpio/gpio-xilinx.c +4 -2
index aaaa74117980..36d91cacc2d9 100644
@@ -175,8 +175,8 @@ static int xgpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
   * This function writes the specified values into the specified signals of the
   * GPIO devices.
   */
-static void xgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
-			       unsigned long *bits)
+static int xgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
+			      unsigned long *bits)
  {
  	DECLARE_BITMAP(hw_mask, 64);
  	DECLARE_BITMAP(hw_bits, 64);
@@ -196,6 +196,8 @@ static void xgpio_set_multiple(struct gpio_chip *gc, unsigned long *mask,
  	bitmap_copy(chip->state, state, 64);
 
  	raw_spin_unlock_irqrestore(&chip->gpio_lock, flags);
+
+	return 0;
  }
 
  /**

drivers/gpio/gpio-xilinx.c static int xgpio_probe(struct platform_device *pdev) · line 613

Quoted 8 lines
drivers/gpio/gpio-xilinx.c +1 -1
@@ -605,7 +607,7 @@ static int xgpio_probe(struct platform_device *pdev)
  	chip->gc.set_rv = xgpio_set;
  	chip->gc.request = xgpio_request;
  	chip->gc.free = xgpio_free;
-	chip->gc.set_multiple = xgpio_set_multiple;
+	chip->gc.set_multiple_rv = xgpio_set_multiple;
 
  	chip->gc.label = dev_name(dev);
 

Thanks,
Michal

author Applied
#2 lore raw
In reply to Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

Quoted 4 lines · Bartosz Golaszewski

The patch converting the driver to using new GPIO line value setters only converted the set() callback and missed set_multiple(). Fix it now.

Applied, thanks!

[1/1] gpio: xilinx: convert set_multiple() to the new API as well

      https://git.kernel.org/brgl/linux/c/906b955c60770bfdfae141aa993ae5fdb3eab193

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>