diff mbox series

[4/4] ARM: s3c/gpio: use new line value setter callbacks

Message ID 20250407-gpiochip-set-rv-arm-v1-4-9e4a914c7fd4@linaro.org (mailing list archive)
State New
Headers show
Series ARM: convert board-file GPIO chips to using new value setters | expand

Commit Message

Bartosz Golaszewski April 7, 2025, 7:09 a.m. UTC
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

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>
---
 arch/arm/mach-s3c/gpio-samsung.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

Comments

Krzysztof Kozlowski April 15, 2025, 6:23 a.m. UTC | #1
On 07/04/2025 09:09, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> 
> 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>
> ---
>  arch/arm/mach-s3c/gpio-samsung.c | 8 +++++---
>  1 file changed, 5 insertions(+), 3 deletions(-)
This was applied a week ago, but it is not in the next (next-20250414).
Are you sure you feed linux-next with all your patches?

Best regards,
Krzysztof
Bartosz Golaszewski April 16, 2025, 3:51 p.m. UTC | #2
On Tue, Apr 15, 2025 at 8:23 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 07/04/2025 09:09, Bartosz Golaszewski wrote:
> > From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> >
> > 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>
> > ---
> >  arch/arm/mach-s3c/gpio-samsung.c | 8 +++++---
> >  1 file changed, 5 insertions(+), 3 deletions(-)
> This was applied a week ago, but it is not in the next (next-20250414).
> Are you sure you feed linux-next with all your patches?
>
> Best regards,
> Krzysztof

Hi!

This is a bit of an exception for me. As discussed with Arnd[1] I
picked the patches up into a new branch and sent out a PR to
arm-soc[2]. Once Arnd merges the PR, the patches will appear in next,
I don't have any ARM branch to feed into linux-next.

Bartosz

[1] https://lore.kernel.org/all/18d59ff1-a357-413c-bde2-961ae0c9b5f2@app.fastmail.com/
[2] https://lore.kernel.org/all/20250409083513.21115-1-brgl@bgdev.pl/
diff mbox series

Patch

diff --git a/arch/arm/mach-s3c/gpio-samsung.c b/arch/arm/mach-s3c/gpio-samsung.c
index 87daaa09e2c3..ea496958f488 100644
--- a/arch/arm/mach-s3c/gpio-samsung.c
+++ b/arch/arm/mach-s3c/gpio-samsung.c
@@ -430,8 +430,8 @@  static int samsung_gpiolib_4bit2_output(struct gpio_chip *chip,
 	return 0;
 }
 
-static void samsung_gpiolib_set(struct gpio_chip *chip,
-				unsigned offset, int value)
+static int samsung_gpiolib_set(struct gpio_chip *chip, unsigned int offset,
+			       int value)
 {
 	struct samsung_gpio_chip *ourchip = to_samsung_gpio(chip);
 	void __iomem *base = ourchip->base;
@@ -447,6 +447,8 @@  static void samsung_gpiolib_set(struct gpio_chip *chip,
 	__raw_writel(dat, base + 0x04);
 
 	samsung_gpio_unlock(ourchip, flags);
+
+	return 0;
 }
 
 static int samsung_gpiolib_get(struct gpio_chip *chip, unsigned offset)
@@ -515,7 +517,7 @@  static void __init samsung_gpiolib_add(struct samsung_gpio_chip *chip)
 	if (!gc->direction_output)
 		gc->direction_output = samsung_gpiolib_2bit_output;
 	if (!gc->set)
-		gc->set = samsung_gpiolib_set;
+		gc->set_rv = samsung_gpiolib_set;
 	if (!gc->get)
 		gc->get = samsung_gpiolib_get;