mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 07:03:03 +02:00
pinctrl: qcom: msm: 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-2-6a6891338aae@linaro.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
17bb810d74
commit
4dc41ae5c0
|
|
@ -637,7 +637,7 @@ static int msm_gpio_get(struct gpio_chip *chip, unsigned offset)
|
|||
return !!(val & BIT(g->in_bit));
|
||||
}
|
||||
|
||||
static void msm_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
|
||||
static int msm_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
|
||||
{
|
||||
const struct msm_pingroup *g;
|
||||
struct msm_pinctrl *pctrl = gpiochip_get_data(chip);
|
||||
|
|
@ -656,6 +656,8 @@ static void msm_gpio_set(struct gpio_chip *chip, unsigned offset, int value)
|
|||
msm_writel_io(val, pctrl, g);
|
||||
|
||||
raw_spin_unlock_irqrestore(&pctrl->lock, flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
|
|
@ -792,7 +794,7 @@ static const struct gpio_chip msm_gpio_template = {
|
|||
.direction_output = msm_gpio_direction_output,
|
||||
.get_direction = msm_gpio_get_direction,
|
||||
.get = msm_gpio_get,
|
||||
.set = msm_gpio_set,
|
||||
.set_rv = msm_gpio_set,
|
||||
.request = gpiochip_generic_request,
|
||||
.free = gpiochip_generic_free,
|
||||
.dbg_show = msm_gpio_dbg_show,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user