linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: xilinx: convert set_multiple() to the new API as well
@ 2025-07-17 13:11 Bartosz Golaszewski
  2025-07-17 13:16 ` Michal Simek
  2025-07-18  7:55 ` Bartosz Golaszewski
  0 siblings, 2 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2025-07-17 13:11 UTC (permalink / raw)
  To: Shubhrajyoti Datta, Srinivas Neeli, Michal Simek, Linus Walleij
  Cc: linux-gpio, linux-arm-kernel, linux-kernel, Bartosz Golaszewski

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

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")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 drivers/gpio/gpio-xilinx.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c
index aaaa74117980..36d91cacc2d9 100644
--- a/drivers/gpio/gpio-xilinx.c
+++ b/drivers/gpio/gpio-xilinx.c
@@ -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);
 
-- 
2.48.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gpio: xilinx: convert set_multiple() to the new API as well
  2025-07-17 13:11 [PATCH] gpio: xilinx: convert set_multiple() to the new API as well Bartosz Golaszewski
@ 2025-07-17 13:16 ` Michal Simek
  2025-07-18  7:55 ` Bartosz Golaszewski
  1 sibling, 0 replies; 3+ messages in thread
From: Michal Simek @ 2025-07-17 13:16 UTC (permalink / raw)
  To: Bartosz Golaszewski, Shubhrajyoti Datta, Srinivas Neeli,
	Linus Walleij
  Cc: linux-gpio, linux-arm-kernel, linux-kernel, Bartosz Golaszewski



On 7/17/25 15:11, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> 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")
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
>   drivers/gpio/gpio-xilinx.c | 8 +++++---
>   1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpio/gpio-xilinx.c b/drivers/gpio/gpio-xilinx.c
> index aaaa74117980..36d91cacc2d9 100644
> --- a/drivers/gpio/gpio-xilinx.c
> +++ b/drivers/gpio/gpio-xilinx.c
> @@ -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);
>   

Acked-by: Michal Simek <michal.simek@amd.com>

Thanks,
Michal

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gpio: xilinx: convert set_multiple() to the new API as well
  2025-07-17 13:11 [PATCH] gpio: xilinx: convert set_multiple() to the new API as well Bartosz Golaszewski
  2025-07-17 13:16 ` Michal Simek
@ 2025-07-18  7:55 ` Bartosz Golaszewski
  1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2025-07-18  7:55 UTC (permalink / raw)
  To: Shubhrajyoti Datta, Srinivas Neeli, Michal Simek, Linus Walleij,
	Bartosz Golaszewski
  Cc: Bartosz Golaszewski, linux-gpio, linux-arm-kernel, linux-kernel

From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


On Thu, 17 Jul 2025 15:11:15 +0200, Bartosz Golaszewski wrote:
> 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,
-- 
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-07-18  7:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-17 13:11 [PATCH] gpio: xilinx: convert set_multiple() to the new API as well Bartosz Golaszewski
2025-07-17 13:16 ` Michal Simek
2025-07-18  7:55 ` Bartosz Golaszewski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).