From: Luca Weiss Date: Thu, 23 Mar 2023 17:57:51 +0000 (+0100) Subject: media: i2c: ov2685: Make reset gpio optional X-Git-Tag: v6.4-rc1~161^2~141 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=0482fbb1c1cc54c9589744690e38316f140647a8;p=linux-block.git media: i2c: ov2685: Make reset gpio optional In some setups XSHUTDOWN is connected to DOVDD when it's unused, therefore treat the reset gpio as optional. Reviewed-by: Jacopo Mondi Signed-off-by: Luca Weiss Signed-off-by: Sakari Ailus Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/i2c/ov2685.c b/drivers/media/i2c/ov2685.c index fdf3e0613330..f119a93e7c64 100644 --- a/drivers/media/i2c/ov2685.c +++ b/drivers/media/i2c/ov2685.c @@ -807,7 +807,7 @@ static int ov2685_probe(struct i2c_client *client) if (clk_get_rate(ov2685->xvclk) != OV2685_XVCLK_FREQ) dev_warn(dev, "xvclk mismatched, modes are based on 24MHz\n"); - ov2685->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); + ov2685->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ov2685->reset_gpio)) { dev_err(dev, "Failed to get reset-gpios\n"); return -EINVAL;