* [RESEND PATCH] pinctrl: rp1: use new GPIO line value setter callbacks
@ 2025-07-17 13:13 Bartosz Golaszewski
2025-07-17 18:31 ` Andrea della Porta
0 siblings, 1 reply; 4+ messages in thread
From: Bartosz Golaszewski @ 2025-07-17 13:13 UTC (permalink / raw)
To: Andrea della Porta, Linus Walleij
Cc: linux-gpio, linux-kernel, Bartosz Golaszewski
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [RESEND PATCH] pinctrl: rp1: use new GPIO line value setter callbacks
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
0 siblings, 0 replies; 4+ messages in thread
From: Andrea della Porta @ 2025-07-17 18:31 UTC (permalink / raw)
To: Bartosz Golaszewski
Cc: Andrea della Porta, Linus Walleij, linux-gpio, linux-kernel,
Bartosz Golaszewski
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>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [RESEND PATCH] pinctrl: rp1: use new GPIO line value setter callbacks
@ 2025-07-19 15:58 Bartosz Golaszewski
2025-07-21 7:15 ` Bartosz Golaszewski
0 siblings, 1 reply; 4+ messages in thread
From: Bartosz Golaszewski @ 2025-07-19 15:58 UTC (permalink / raw)
To: Andrea della Porta, Linus Walleij, Florian Fainelli,
Greg Kroah-Hartman, Arnd Bergmann
Cc: linux-gpio, linux-kernel, Bartosz Golaszewski
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.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
This driver was not queued via the pinctrl tree as it should so it flew
under my radar and it uses a deprecated interface that we *really* want
to remove in v6.17. This patch addresses it. I would really appreciate
it if it could be queued on top of the SoC tree before the merge window.
Arnd: could you take it directly?
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [RESEND PATCH] pinctrl: rp1: use new GPIO line value setter callbacks
2025-07-19 15:58 Bartosz Golaszewski
@ 2025-07-21 7:15 ` Bartosz Golaszewski
0 siblings, 0 replies; 4+ messages in thread
From: Bartosz Golaszewski @ 2025-07-21 7:15 UTC (permalink / raw)
To: Andrea della Porta, Linus Walleij, Florian Fainelli,
Greg Kroah-Hartman, Arnd Bergmann
Cc: linux-gpio, linux-kernel, Bartosz Golaszewski
On Sat, Jul 19, 2025 at 5:58 PM Bartosz Golaszewski <brgl@bgdev.pl> 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.
>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
> ---
> This driver was not queued via the pinctrl tree as it should so it flew
> under my radar and it uses a deprecated interface that we *really* want
> to remove in v6.17. This patch addresses it. I would really appreciate
> it if it could be queued on top of the SoC tree before the merge window.
> Arnd: could you take it directly?
>
Reviewed-by: Andrea della Porta <andrea.porta@suse.com>
https://lore.kernel.org/all/aHlBZftbEphBYC83@apocalypse/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-07-21 7:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
-- strict thread matches above, loose matches on Subject: below --
2025-07-19 15:58 Bartosz Golaszewski
2025-07-21 7:15 ` 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).