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

From: Linus Walleij
Date: Wed Apr 16 2025 - 03:36:15 EST


Hi Jonathan,

thanks for your patch!

On Fri, Apr 11, 2025 at 5:58 PM Jonathan Santos
<Jonathan.Santos@xxxxxxxxxx> 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