pinctrl: ma35: use new GPIO line value setter callbacks
Subsystems (3)
PATCH 1/1 pinctrl: ma35: use new GPIO line value setter callbacks
From: Bartosz Golaszewski <[email protected]>
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 <[email protected]>
---
I realized one of the pinctrl drivers was missed during the conversion.
drivers/pinctrl/nuvoton/pinctrl-ma35.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/pinctrl/nuvoton/pinctrl-ma35.c +4 -2
@@ -361,7 +361,7 @@ static int ma35_gpio_core_get(struct gpio_chip *gc, unsigned int gpio)return !!(readl (reg_pin) &BIT (gpio)); } -static void ma35_gpio_core_set (struct gpio_chip *gc,unsigned int gpio,int val) +static int ma35_gpio_core_set (struct gpio_chip *gc,unsigned int gpio,int val) {struct ma35_pin_bank *bank =gpiochip_get_data (gc);void __iomem *reg_dout = bank->reg_base +MA35_GP_REG_DOUT ;
@@ -373,6 +373,8 @@ static void ma35_gpio_core_set(struct gpio_chip *gc, unsigned int gpio, int val) regval =readl (reg_dout) & ~BIT (gpio);writel (regval, reg_dout); + +return 0 ; }static int ma35_gpio_core_to_request (struct gpio_chip *gc,unsigned int gpio)
@@ -524,7 +526,7 @@ static int ma35_gpiolib_register(struct platform_device *pdev, struct ma35_pinct bank->chip.direction_input = ma35_gpio_core_direction_in; bank->chip.direction_output = ma35_gpio_core_direction_out; bank->chip.get = ma35_gpio_core_get; - bank->chip.set = ma35_gpio_core_set; + bank->chip.set_rv = ma35_gpio_core_set; bank->chip.base =-1 ; bank->chip.ngpio = bank->nr_pins; bank->chip.can_sleep = false;
Signature · 1 line
2.48.1
Quoted 7 lines · Bartosz Golaszewski
From: Bartosz Golaszewski <[email protected]>
struct
gpio_chipnow 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 <[email protected]>
Patch applied!
Yours,
Linus Walleij