From: Andrea della Porta <andrea.porta@suse.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: Andrea della Porta <andrea.porta@suse.com>,
Linus Walleij <linus.walleij@linaro.org>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Subject: Re: [RESEND PATCH] pinctrl: rp1: use new GPIO line value setter callbacks
Date: Thu, 17 Jul 2025 20:31:01 +0200 [thread overview]
Message-ID: <aHlBZftbEphBYC83@apocalypse> (raw)
In-Reply-To: <20250717131349.54074-1-brgl@bgdev.pl>
Hi Bartosz,
On 15:13 Thu 17 Jul , 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>
> ---
> Resending with linux-gpio correctly in Cc.
>
> Another driver we missed, that should be the last one under
> drivers/pinctrl/.
>
> drivers/pinctrl/pinctrl-rp1.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pinctrl/pinctrl-rp1.c b/drivers/pinctrl/pinctrl-rp1.c
> index d300f28c52cd..6080b57a5d87 100644
> --- a/drivers/pinctrl/pinctrl-rp1.c
> +++ b/drivers/pinctrl/pinctrl-rp1.c
> @@ -779,12 +779,14 @@ static int rp1_gpio_get(struct gpio_chip *chip, unsigned int offset)
> return ret;
> }
>
> -static void rp1_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
> +static int rp1_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
> {
> struct rp1_pin_info *pin = rp1_get_pin(chip, offset);
>
> if (pin)
> rp1_set_value(pin, value);
> +
> + return 0;
> }
>
> static int rp1_gpio_get_direction(struct gpio_chip *chip, unsigned int offset)
> @@ -849,7 +851,7 @@ static const struct gpio_chip rp1_gpio_chip = {
> .direction_output = rp1_gpio_direction_output,
> .get_direction = rp1_gpio_get_direction,
> .get = rp1_gpio_get,
> - .set = rp1_gpio_set,
> + .set_rv = rp1_gpio_set,
> .base = -1,
> .set_config = rp1_gpio_set_config,
> .ngpio = RP1_NUM_GPIOS,
> --
> 2.48.1
>
Reviewed-by: Andrea della Porta <andrea.porta@suse.com>
next prev parent reply other threads:[~2025-07-17 18:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-17 13:13 [RESEND PATCH] pinctrl: rp1: use new GPIO line value setter callbacks Bartosz Golaszewski
2025-07-17 18:31 ` Andrea della Porta [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-07-19 15:58 Bartosz Golaszewski
2025-07-21 7:15 ` Bartosz Golaszewski
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=aHlBZftbEphBYC83@apocalypse \
--to=andrea.porta@suse.com \
--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 \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.