Commit
256148246852 ("[media] tc358743: support probe from device tree")
specified in the device tree binding documentation that the reset gpio
is optional. Make the implementation match accordingly.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
state->pdata.ths_trailcnt = 0x2;
state->pdata.hstxvregcnt = 0;
- state->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
+ state->reset_gpio = devm_gpiod_get_optional(dev, "reset",
+ GPIOD_OUT_LOW);
if (IS_ERR(state->reset_gpio)) {
dev_err(dev, "failed to get reset gpio\n");
ret = PTR_ERR(state->reset_gpio);
goto disable_clk;
}
- tc358743_gpio_reset(state);
+ if (state->reset_gpio)
+ tc358743_gpio_reset(state);
ret = 0;
goto free_endpoint;