[PATCH 5/6] gpio: TODO: add an item to track the conversion to the new value setters

Bartosz Golaszewski posted 6 patches 9 months ago
[PATCH 5/6] gpio: TODO: add an item to track the conversion to the new value setters
Posted by Bartosz Golaszewski 9 months ago
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Add an item tracking the treewide conversion of GPIO drivers to using
the new line value setter callbacks in struct gpio_chip instead of the
old ones that don't allow drivers to signal failures to callers.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
---
 drivers/gpio/TODO | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/gpio/TODO b/drivers/gpio/TODO
index 052ba70070033..3abf4805335f1 100644
--- a/drivers/gpio/TODO
+++ b/drivers/gpio/TODO
@@ -161,3 +161,15 @@ A small number of drivers have been converted (pl061, tegra186, msm,
 amd, apple), and can be used as examples of how to proceed with this
 conversion. Note that drivers using the generic irqchip framework
 cannot be converted yet, but watch this space!
+
+-------------------------------------------------------------------------------
+
+Convert all GPIO chips to using the new, value returning line setters
+
+struct gpio_chip's set() and set_multiple() callbacks are now deprecated. They
+return void and thus do not allow drivers to indicate failure to set the line
+value back to the caller.
+
+We've now added new variants - set_rv() and set_multiple_rv() that return an
+integer. Let's convert all GPIO drivers treewide to use the new callbacks,
+remove the old ones and finally rename the new ones back to the old names.

-- 
2.45.2
Re: [PATCH 5/6] gpio: TODO: add an item to track the conversion to the new value setters
Posted by Linus Walleij 8 months, 4 weeks ago
On Fri, Mar 21, 2025 at 4:49 PM Bartosz Golaszewski <brgl@bgdev.pl> wrote:

> From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
>
> Add an item tracking the treewide conversion of GPIO drivers to using
> the new line value setter callbacks in struct gpio_chip instead of the
> old ones that don't allow drivers to signal failures to callers.
>
> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>

Actually I have memories of thinking "we should really fix this" ages
ago, but didn't want to put it on my TBD because there were so
overwhelmingly many things to fix already. Then I forgot to add it
here instead. So:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij