From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Bartosz Golaszewski <brgl@bgdev.pl>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Naveen N Rao <naveen@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>,
Anatolij Gustschin <agust@denx.de>
Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
linux-gpio@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [PATCH 3/5] powerpc: 44x/gpio: use new line value setter callbacks
Date: Wed, 30 Apr 2025 19:35:26 +0200 [thread overview]
Message-ID: <fab558c6-0403-45f4-97c3-9c71db678a20@csgroup.eu> (raw)
In-Reply-To: <20250408-gpiochip-set-rv-powerpc-v1-3-73dc1ebc6ef1@linaro.org>
Le 08/04/2025 à 09:21, Bartosz Golaszewski a écrit :
> 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>
Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>
> ---
> arch/powerpc/platforms/44x/gpio.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/arch/powerpc/platforms/44x/gpio.c b/arch/powerpc/platforms/44x/gpio.c
> index e5f2319e5cbe..d540e261d85a 100644
> --- a/arch/powerpc/platforms/44x/gpio.c
> +++ b/arch/powerpc/platforms/44x/gpio.c
> @@ -75,8 +75,7 @@ __ppc4xx_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
> clrbits32(®s->or, GPIO_MASK(gpio));
> }
>
> -static void
> -ppc4xx_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
> +static int ppc4xx_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
> {
> struct ppc4xx_gpio_chip *chip = gpiochip_get_data(gc);
> unsigned long flags;
> @@ -88,6 +87,8 @@ ppc4xx_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
> spin_unlock_irqrestore(&chip->lock, flags);
>
> pr_debug("%s: gpio: %d val: %d\n", __func__, gpio, val);
> +
> + return 0;
> }
>
> static int ppc4xx_gpio_dir_in(struct gpio_chip *gc, unsigned int gpio)
> @@ -179,7 +180,7 @@ static int __init ppc4xx_add_gpiochips(void)
> gc->direction_input = ppc4xx_gpio_dir_in;
> gc->direction_output = ppc4xx_gpio_dir_out;
> gc->get = ppc4xx_gpio_get;
> - gc->set = ppc4xx_gpio_set;
> + gc->set_rv = ppc4xx_gpio_set;
>
> ret = of_mm_gpiochip_add_data(np, mm_gc, ppc4xx_gc);
> if (ret)
>
next prev parent reply other threads:[~2025-04-30 17:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 7:21 [PATCH 0/5] powerpc: convert board-file GPIO chips to using new value setters Bartosz Golaszewski
2025-04-08 7:21 ` [PATCH 1/5] powerpc: sysdev/gpio: use new line value setter callbacks Bartosz Golaszewski
2025-04-30 17:35 ` Christophe Leroy
2025-04-08 7:21 ` [PATCH 2/5] powerpc: 83xx/gpio: " Bartosz Golaszewski
2025-04-30 17:33 ` Christophe Leroy
2025-04-30 17:37 ` Bartosz Golaszewski
2025-04-30 17:47 ` Christophe Leroy
2025-04-30 17:48 ` Bartosz Golaszewski
2025-04-08 7:21 ` [PATCH 3/5] powerpc: 44x/gpio: " Bartosz Golaszewski
2025-04-30 17:35 ` Christophe Leroy [this message]
2025-04-08 7:21 ` [PATCH 4/5] powerpc: 52xx/gpio: " Bartosz Golaszewski
2025-04-30 17:35 ` Christophe Leroy
2025-04-08 7:21 ` [PATCH 5/5] powerpc: 8xx/gpio: " Bartosz Golaszewski
2025-04-30 17:36 ` Christophe Leroy
2025-04-23 15:15 ` [PATCH 0/5] powerpc: convert board-file GPIO chips to using new value setters Bartosz Golaszewski
2025-04-24 8:53 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fab558c6-0403-45f4-97c3-9c71db678a20@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=agust@denx.de \
--cc=bartosz.golaszewski@linaro.org \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mpe@ellerman.id.au \
--cc=naveen@kernel.org \
--cc=npiggin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).