diff mbox

[1/2,media] tc358743: set direction of reset gpio using devm_gpiod_get

Message ID 1439886670-12322-1-git-send-email-u.kleine-koenig@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Uwe Kleine-König Aug. 18, 2015, 8:31 a.m. UTC
Commit 256148246852 ("[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>
---
 drivers/media/i2c/tc358743.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Linus Walleij Aug. 19, 2015, 5:55 a.m. UTC | #1
On Tue, Aug 18, 2015 at 10:31 AM, Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:

> Commit 256148246852 ("[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>

Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Philipp Zabel Aug. 19, 2015, 8:31 a.m. UTC | #2
Am Dienstag, den 18.08.2015, 10:31 +0200 schrieb Uwe Kleine-König:
> Commit 256148246852 ("[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>

Acked-by: Philipp Zabel <p.zabel@pengutronix.de>

thanks
Philipp

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c
index 76d0aaa19493..6ca6c0817993 100644
--- a/drivers/media/i2c/tc358743.c
+++ b/drivers/media/i2c/tc358743.c
@@ -1648,7 +1648,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);
@@ -1750,7 +1749,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);