mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 14:42:08 +02:00
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>
This commit is contained in:
parent
cd5a048c1a
commit
454071ac3c
|
|
@ -511,14 +511,15 @@ static int pm8xxx_mpp_get(struct gpio_chip *chip, unsigned offset)
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void pm8xxx_mpp_set(struct gpio_chip *chip, unsigned offset, int value)
|
||||
static int pm8xxx_mpp_set(struct gpio_chip *chip, unsigned int offset,
|
||||
int value)
|
||||
{
|
||||
struct pm8xxx_mpp *pctrl = gpiochip_get_data(chip);
|
||||
struct pm8xxx_pin_data *pin = pctrl->desc.pins[offset].drv_data;
|
||||
|
||||
pin->output_value = !!value;
|
||||
|
||||
pm8xxx_mpp_update(pctrl, pin);
|
||||
return pm8xxx_mpp_update(pctrl, pin);
|
||||
}
|
||||
|
||||
static int pm8xxx_mpp_of_xlate(struct gpio_chip *chip,
|
||||
|
|
@ -633,7 +634,7 @@ static const struct gpio_chip pm8xxx_mpp_template = {
|
|||
.direction_input = pm8xxx_mpp_direction_input,
|
||||
.direction_output = pm8xxx_mpp_direction_output,
|
||||
.get = pm8xxx_mpp_get,
|
||||
.set = pm8xxx_mpp_set,
|
||||
.set_rv = pm8xxx_mpp_set,
|
||||
.of_xlate = pm8xxx_mpp_of_xlate,
|
||||
.dbg_show = pm8xxx_mpp_dbg_show,
|
||||
.owner = THIS_MODULE,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user