Re: [PATCH v5 09/14] iio: adc: ad7768-1: Add GPIO controller support

Linus Walleij
2025-04-16T07:36:01Z

Hi Jonathan,

thanks for your patch!

On Fri, Apr 11, 2025 at 5:58 PM Jonathan Santos
<Jonathan.Santos@analog.com> wrote:

> +static void ad7768_gpio_set(struct gpio_chip *chip, unsigned int offset, int value)
> +{
(...)
> + st->gpiochip = (struct gpio_chip) {
> + .label = "ad7768_1_gpios",
> + .base = -1,
> + .ngpio = 4,
> + .parent = &st->spi->dev,
> + .can_sleep = true,
> + .direction_input = ad7768_gpio_direction_input,
> + .direction_output = ad7768_gpio_direction_output,
> + .get = ad7768_gpio_get,
> + .set = ad7768_gpio_set,

Due to refactorings going on in the .set calls please switch this to use
the new .set_rv() callback that return an integer (errorcode) on failure.

Yours,
Linus Walleij