linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] MIPS: alchemy: gpio: use new GPIO line value setter callbacks for the remaining chips
@ 2025-07-27  8:24 Bartosz Golaszewski
  2025-07-27 19:01 ` Thomas Bogendoerfer
  2025-07-28  6:03 ` Bartosz Golaszewski
  0 siblings, 2 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2025-07-27  8:24 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Linus Walleij
  Cc: linux-mips, linux-kernel, Bartosz Golaszewski

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

Previous commit missed two other places that need converting, it only
came out in tests on autobuilders now. Convert the rest of the driver.

Fixes: 68bdc4dc1130 ("MIPS: alchemy: gpio: use new line value setter callbacks")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
Thomas: this flew under my radar until it came out in autobuilder tests
now. Thomas: if it's too late for you to take it through the MIPS tree
for v6.17, can you Ack it and let me take it directly through the GPIO
tree? This change is needed for us to complete the rework of GPIO
callbacks during the next cycle.

 arch/mips/alchemy/common/gpiolib.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/mips/alchemy/common/gpiolib.c b/arch/mips/alchemy/common/gpiolib.c
index 411f70ceb762..194034eba75f 100644
--- a/arch/mips/alchemy/common/gpiolib.c
+++ b/arch/mips/alchemy/common/gpiolib.c
@@ -40,9 +40,11 @@ static int gpio2_get(struct gpio_chip *chip, unsigned offset)
 	return !!alchemy_gpio2_get_value(offset + ALCHEMY_GPIO2_BASE);
 }
 
-static void gpio2_set(struct gpio_chip *chip, unsigned offset, int value)
+static int gpio2_set(struct gpio_chip *chip, unsigned offset, int value)
 {
 	alchemy_gpio2_set_value(offset + ALCHEMY_GPIO2_BASE, value);
+
+	return 0;
 }
 
 static int gpio2_direction_input(struct gpio_chip *chip, unsigned offset)
@@ -68,10 +70,12 @@ static int gpio1_get(struct gpio_chip *chip, unsigned offset)
 	return !!alchemy_gpio1_get_value(offset + ALCHEMY_GPIO1_BASE);
 }
 
-static void gpio1_set(struct gpio_chip *chip,
+static int gpio1_set(struct gpio_chip *chip,
 				unsigned offset, int value)
 {
 	alchemy_gpio1_set_value(offset + ALCHEMY_GPIO1_BASE, value);
+
+	return 0;
 }
 
 static int gpio1_direction_input(struct gpio_chip *chip, unsigned offset)
@@ -97,7 +101,7 @@ struct gpio_chip alchemy_gpio_chip[] = {
 		.direction_input	= gpio1_direction_input,
 		.direction_output	= gpio1_direction_output,
 		.get			= gpio1_get,
-		.set			= gpio1_set,
+		.set_rv			= gpio1_set,
 		.to_irq			= gpio1_to_irq,
 		.base			= ALCHEMY_GPIO1_BASE,
 		.ngpio			= ALCHEMY_GPIO1_NUM,
@@ -107,7 +111,7 @@ struct gpio_chip alchemy_gpio_chip[] = {
 		.direction_input	= gpio2_direction_input,
 		.direction_output	= gpio2_direction_output,
 		.get			= gpio2_get,
-		.set			= gpio2_set,
+		.set_rv			= gpio2_set,
 		.to_irq			= gpio2_to_irq,
 		.base			= ALCHEMY_GPIO2_BASE,
 		.ngpio			= ALCHEMY_GPIO2_NUM,
-- 
2.48.1


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

* Re: [PATCH] MIPS: alchemy: gpio: use new GPIO line value setter callbacks for the remaining chips
  2025-07-27  8:24 [PATCH] MIPS: alchemy: gpio: use new GPIO line value setter callbacks for the remaining chips Bartosz Golaszewski
@ 2025-07-27 19:01 ` Thomas Bogendoerfer
  2025-07-28  6:03 ` Bartosz Golaszewski
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Bogendoerfer @ 2025-07-27 19:01 UTC (permalink / raw)
  To: Bartosz Golaszewski
  Cc: Linus Walleij, linux-mips, linux-kernel, Bartosz Golaszewski

On Sun, Jul 27, 2025 at 10:24:42AM +0200, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> Previous commit missed two other places that need converting, it only
> came out in tests on autobuilders now. Convert the rest of the driver.
> 
> Fixes: 68bdc4dc1130 ("MIPS: alchemy: gpio: use new line value setter callbacks")
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
> Thomas: this flew under my radar until it came out in autobuilder tests
> now. Thomas: if it's too late for you to take it through the MIPS tree
> for v6.17, can you Ack it and let me take it directly through the GPIO
> tree? This change is needed for us to complete the rework of GPIO
> callbacks during the next cycle.
> 
>  arch/mips/alchemy/common/gpiolib.c | 12 ++++++++----
>  1 file changed, 8 insertions(+), 4 deletions(-)

Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

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

* Re: [PATCH] MIPS: alchemy: gpio: use new GPIO line value setter callbacks for the remaining chips
  2025-07-27  8:24 [PATCH] MIPS: alchemy: gpio: use new GPIO line value setter callbacks for the remaining chips Bartosz Golaszewski
  2025-07-27 19:01 ` Thomas Bogendoerfer
@ 2025-07-28  6:03 ` Bartosz Golaszewski
  1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2025-07-28  6:03 UTC (permalink / raw)
  To: Thomas Bogendoerfer, Linus Walleij, Bartosz Golaszewski
  Cc: Bartosz Golaszewski, linux-mips, linux-kernel

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


On Sun, 27 Jul 2025 10:24:42 +0200, Bartosz Golaszewski wrote:
> Previous commit missed two other places that need converting, it only
> came out in tests on autobuilders now. Convert the rest of the driver.
> 
> 

Applied, thanks!

[1/1] MIPS: alchemy: gpio: use new GPIO line value setter callbacks for the remaining chips
      https://git.kernel.org/brgl/linux/c/6b94bf976f9f9e6d4a6bf3218968a506c049702e

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

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

end of thread, other threads:[~2025-07-28  6:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-27  8:24 [PATCH] MIPS: alchemy: gpio: use new GPIO line value setter callbacks for the remaining chips Bartosz Golaszewski
2025-07-27 19:01 ` Thomas Bogendoerfer
2025-07-28  6:03 ` 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).