]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
MIPS: alchemy: gpio: use new GPIO line value setter callbacks for the remaining chips
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Sun, 27 Jul 2025 08:24:42 +0000 (10:24 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 28 Jul 2025 06:03:08 +0000 (08:03 +0200)
Previous commit missed two other places that need converting, it only
came out in tests on autobuilders now. Convert the rest of the driver.

Fixes: 68bdc4dc1130 ("MIPS: alchemy: gpio: use new line value setter callbacks")
Acked-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Link: https://lore.kernel.org/r/20250727082442.13182-1-brgl@bgdev.pl
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
arch/mips/alchemy/common/gpiolib.c

index 411f70ceb762ae4cedef24cd60ced92b64e31d01..194034eba75fd6387edd555358a44a8f65a07737 100644 (file)
@@ -40,9 +40,11 @@ static int gpio2_get(struct gpio_chip *chip, unsigned offset)
        return !!alchemy_gpio2_get_value(offset + ALCHEMY_GPIO2_BASE);
 }
 
-static void gpio2_set(struct gpio_chip *chip, unsigned offset, int value)
+static int gpio2_set(struct gpio_chip *chip, unsigned offset, int value)
 {
        alchemy_gpio2_set_value(offset + ALCHEMY_GPIO2_BASE, value);
+
+       return 0;
 }
 
 static int gpio2_direction_input(struct gpio_chip *chip, unsigned offset)
@@ -68,10 +70,12 @@ static int gpio1_get(struct gpio_chip *chip, unsigned offset)
        return !!alchemy_gpio1_get_value(offset + ALCHEMY_GPIO1_BASE);
 }
 
-static void gpio1_set(struct gpio_chip *chip,
+static int gpio1_set(struct gpio_chip *chip,
                                unsigned offset, int value)
 {
        alchemy_gpio1_set_value(offset + ALCHEMY_GPIO1_BASE, value);
+
+       return 0;
 }
 
 static int gpio1_direction_input(struct gpio_chip *chip, unsigned offset)
@@ -97,7 +101,7 @@ struct gpio_chip alchemy_gpio_chip[] = {
                .direction_input        = gpio1_direction_input,
                .direction_output       = gpio1_direction_output,
                .get                    = gpio1_get,
-               .set                    = gpio1_set,
+               .set_rv                 = gpio1_set,
                .to_irq                 = gpio1_to_irq,
                .base                   = ALCHEMY_GPIO1_BASE,
                .ngpio                  = ALCHEMY_GPIO1_NUM,
@@ -107,7 +111,7 @@ struct gpio_chip alchemy_gpio_chip[] = {
                .direction_input        = gpio2_direction_input,
                .direction_output       = gpio2_direction_output,
                .get                    = gpio2_get,
-               .set                    = gpio2_set,
+               .set_rv                 = gpio2_set,
                .to_irq                 = gpio2_to_irq,
                .base                   = ALCHEMY_GPIO2_BASE,
                .ngpio                  = ALCHEMY_GPIO2_NUM,