Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

pinctrl: qcom: ssbi-mpp: use new GPIO line value setter callbacks

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>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/20250410-gpiochip-set-rv-pinctrl-qcom-v1-6-6a6891338aae@linaro.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Bartosz Golaszewski and committed by
Linus Walleij
454071ac cd5a048c

+4 -3
+4 -3
drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
··· 511 511 return ret; 512 512 } 513 513 514 - static void pm8xxx_mpp_set(struct gpio_chip *chip, unsigned offset, int value) 514 + static int pm8xxx_mpp_set(struct gpio_chip *chip, unsigned int offset, 515 + int value) 515 516 { 516 517 struct pm8xxx_mpp *pctrl = gpiochip_get_data(chip); 517 518 struct pm8xxx_pin_data *pin = pctrl->desc.pins[offset].drv_data; 518 519 519 520 pin->output_value = !!value; 520 521 521 - pm8xxx_mpp_update(pctrl, pin); 522 + return pm8xxx_mpp_update(pctrl, pin); 522 523 } 523 524 524 525 static int pm8xxx_mpp_of_xlate(struct gpio_chip *chip, ··· 634 633 .direction_input = pm8xxx_mpp_direction_input, 635 634 .direction_output = pm8xxx_mpp_direction_output, 636 635 .get = pm8xxx_mpp_get, 637 - .set = pm8xxx_mpp_set, 636 + .set_rv = pm8xxx_mpp_set, 638 637 .of_xlate = pm8xxx_mpp_of_xlate, 639 638 .dbg_show = pm8xxx_mpp_dbg_show, 640 639 .owner = THIS_MODULE,