mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
[media] tc358743: make reset gpio optional
Commit 2561482468 ("[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 <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Acked-by: Philipp Zabel <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
06d3f2e020
commit
1e137d92c0
1 changed files with 4 additions and 2 deletions
|
|
@ -1782,14 +1782,16 @@ static int tc358743_probe_of(struct tc358743_state *state)
|
|||
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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue