Re: [PATCH 1/4] media: i2c: s5k6a3: switch to using gpiod API

From: Linus Walleij
Date: Thu Nov 17 2022 - 04:05:23 EST


On Tue, Nov 15, 2022 at 11:11 PM Dmitry Torokhov
<dmitry.torokhov@xxxxxxxxx> wrote:

> This patch switches the driver away from legacy gpio/of_gpio API to
> gpiod API, and removes one of the last uses of of_get_gpio_flags().
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>

Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>

> - sensor->gpio_reset = -EINVAL;
> - sensor->clock = ERR_PTR(-EINVAL);

Looks unrelated but makes sense.

> sensor->dev = dev;
>
> sensor->clock = devm_clk_get(sensor->dev, S5K6A3_CLK_NAME);

Given that it is initialized unconditionally two lines down :P

Yours,
Linus Walleij