Message ID | 20250407-gpiochip-set-rv-arm-v1-1-9e4a914c7fd4@linaro.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | ARM: convert board-file GPIO chips to using new value setters | expand |
On Mon, Apr 07, 2025 at 09:09:18AM +0200, 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> What is you intended merge path for these? Have arm-soc take them as a whole? Reviewed-by: Andrew Lunn <andrew@lunn.ch> Andrew
On Tue, Apr 8, 2025 at 2:03 PM Andrew Lunn <andrew@lunn.ch> wrote: > > On Mon, Apr 07, 2025 at 09:09:18AM +0200, 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> > > What is you intended merge path for these? Have arm-soc take them as a > whole? > > Reviewed-by: Andrew Lunn <andrew@lunn.ch> > That would be best, yes. I'm not sure how many of these platforms are actively maintained. Arnd: you were not Cc'ed on this (get_maintainer.pl didn't show your address) but could you take this through the arm-soc tree? Bart
On Tue, Apr 8, 2025, at 14:12, Bartosz Golaszewski wrote: > On Tue, Apr 8, 2025 at 2:03 PM Andrew Lunn <andrew@lunn.ch> wrote: >> >> On Mon, Apr 07, 2025 at 09:09:18AM +0200, 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> >> >> What is you intended merge path for these? Have arm-soc take them as a >> whole? >> >> Reviewed-by: Andrew Lunn <andrew@lunn.ch> >> > > That would be best, yes. I'm not sure how many of these platforms are > actively maintained. > > Arnd: you were not Cc'ed on this (get_maintainer.pl didn't show your > address) but could you take this through the arm-soc tree? Sure, can you send them once more to soc@lists.linux.dev, either as patches or a pull request? Arnd
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c index 595e9cb33c1d..766036fdd792 100644 --- a/arch/arm/plat-orion/gpio.c +++ b/arch/arm/plat-orion/gpio.c @@ -211,7 +211,7 @@ orion_gpio_direction_output(struct gpio_chip *chip, unsigned pin, int value) return 0; } -static void orion_gpio_set(struct gpio_chip *chip, unsigned pin, int value) +static int orion_gpio_set(struct gpio_chip *chip, unsigned int pin, int value) { struct orion_gpio_chip *ochip = gpiochip_get_data(chip); unsigned long flags; @@ -219,6 +219,8 @@ static void orion_gpio_set(struct gpio_chip *chip, unsigned pin, int value) spin_lock_irqsave(&ochip->lock, flags); __set_level(ochip, pin, value); spin_unlock_irqrestore(&ochip->lock, flags); + + return 0; } static int orion_gpio_to_irq(struct gpio_chip *chip, unsigned pin) @@ -540,7 +542,7 @@ void __init orion_gpio_init(int gpio_base, int ngpio, ochip->chip.direction_input = orion_gpio_direction_input; ochip->chip.get = orion_gpio_get; ochip->chip.direction_output = orion_gpio_direction_output; - ochip->chip.set = orion_gpio_set; + ochip->chip.set_rv = orion_gpio_set; ochip->chip.to_irq = orion_gpio_to_irq; ochip->chip.base = gpio_base; ochip->chip.ngpio = ngpio;