Commit 1e137d92 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Mauro Carvalho Chehab

[media] tc358743: make reset gpio optional

Commit 25614824 ("[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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 06d3f2e0
...@@ -1782,14 +1782,16 @@ static int tc358743_probe_of(struct tc358743_state *state) ...@@ -1782,14 +1782,16 @@ static int tc358743_probe_of(struct tc358743_state *state)
state->pdata.ths_trailcnt = 0x2; state->pdata.ths_trailcnt = 0x2;
state->pdata.hstxvregcnt = 0; 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)) { if (IS_ERR(state->reset_gpio)) {
dev_err(dev, "failed to get reset gpio\n"); dev_err(dev, "failed to get reset gpio\n");
ret = PTR_ERR(state->reset_gpio); ret = PTR_ERR(state->reset_gpio);
goto disable_clk; goto disable_clk;
} }
tc358743_gpio_reset(state); if (state->reset_gpio)
tc358743_gpio_reset(state);
ret = 0; ret = 0;
goto free_endpoint; goto free_endpoint;
......
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