Skip to content

Commit

Permalink
[media] tc358743: set direction of reset gpio using devm_gpiod_get
Browse files Browse the repository at this point in the history
Commit 2561482 ("[media] tc358743: support probe from device tree")
failed to explicitly set the direction of the reset gpio. Use the
optional flag of devm_gpiod_get to make up leeway.

This is also necessary because the flag parameter will become mandatory
soon.

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>
  • Loading branch information
Uwe Kleine-König authored and Mauro Carvalho Chehab committed Sep 3, 2015
1 parent d071c83 commit 06d3f2e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/media/i2c/tc358743.c
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,6 @@ static const struct v4l2_ctrl_config tc358743_ctrl_audio_present = {
#ifdef CONFIG_OF
static void tc358743_gpio_reset(struct tc358743_state *state)
{
gpiod_set_value(state->reset_gpio, 0);
usleep_range(5000, 10000);
gpiod_set_value(state->reset_gpio, 1);
usleep_range(1000, 2000);
Expand Down Expand Up @@ -1783,7 +1782,7 @@ 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");
state->reset_gpio = devm_gpiod_get(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);
Expand Down

0 comments on commit 06d3f2e

Please sign in to comment.