Commit 0482fbb1 authored by Luca Weiss's avatar Luca Weiss Committed by Hans Verkuil

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: default avatarJacopo Mondi <jacopo.mondi@ideasonboard.com>
Signed-off-by: default avatarLuca Weiss <luca@z3ntu.xyz>
Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 8d561d78
...@@ -807,7 +807,7 @@ static int ov2685_probe(struct i2c_client *client) ...@@ -807,7 +807,7 @@ static int ov2685_probe(struct i2c_client *client)
if (clk_get_rate(ov2685->xvclk) != OV2685_XVCLK_FREQ) if (clk_get_rate(ov2685->xvclk) != OV2685_XVCLK_FREQ)
dev_warn(dev, "xvclk mismatched, modes are based on 24MHz\n"); 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)) { if (IS_ERR(ov2685->reset_gpio)) {
dev_err(dev, "Failed to get reset-gpios\n"); dev_err(dev, "Failed to get reset-gpios\n");
return -EINVAL; return -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment