[PATCH 02/12] pinctrl: axp209: use new GPIO line value setter callbacks

Bartosz Golaszewski brgl at bgdev.pl
Thu Apr 24 11:55:33 PDT 2025


On Thu, Apr 24, 2025 at 7:43 PM Chen-Yu Tsai <wens at csie.org> wrote:
>
> On Thu, Apr 24, 2025 at 4:35 PM Bartosz Golaszewski <brgl at bgdev.pl> wrote:
> >
> > From: Bartosz Golaszewski <bartosz.golaszewski at 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 at linaro.org>
>>
> >         /* AXP209 has GPIO3 status sharing the settings register */
> >         if (offset == 3) {
> > -               regmap_update_bits(pctl->regmap, AXP20X_GPIO3_CTRL,
> > -                                  AXP20X_GPIO3_FUNCTIONS,
> > -                                  value ? AXP20X_GPIO3_FUNCTION_OUT_HIGH :
> > -                                  AXP20X_GPIO3_FUNCTION_OUT_LOW);
> > -               return;
> > +               return regmap_update_bits(pctl->regmap, AXP20X_GPIO3_CTRL,
> > +                                         AXP20X_GPIO3_FUNCTIONS,
> > +                                         value ?
> > +                                               AXP20X_GPIO3_FUNCTION_OUT_HIGH :
> > +                                               AXP20X_GPIO3_FUNCTION_OUT_LOW);
> >         }
>
> I guess you could also drop the curly braces, but otherwise
>
> Reviewed-by: Chen-Yu Tsai <wens at csie.org>
>

Right. Linus: can you remove them while applying?

Bart



More information about the linux-arm-kernel mailing list