From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Hans Verkuil <hans.verkuil@cisco.com>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
kernel@pengutronix.de, Mats Randgaard <matrandg@cisco.com>,
linux-media@vger.kernel.org
Subject: [PATCH 1/2] [media] tc358743: set direction of reset gpio using devm_gpiod_get
Date: Tue, 18 Aug 2015 10:31:09 +0200 [thread overview]
Message-ID: <1439886670-12322-1-git-send-email-u.kleine-koenig@pengutronix.de> (raw)
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(-)
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);
--
2.4.6
next reply other threads:[~2015-08-18 8:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-18 8:31 Uwe Kleine-König [this message]
2015-08-18 8:31 ` [PATCH 2/2] [media] tc358743: make reset gpio optional Uwe Kleine-König
2015-08-19 5:56 ` Linus Walleij
2015-08-19 8:31 ` Philipp Zabel
2015-08-19 5:55 ` [PATCH 1/2] [media] tc358743: set direction of reset gpio using devm_gpiod_get Linus Walleij
2015-08-19 8:31 ` Philipp Zabel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1439886670-12322-1-git-send-email-u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=hans.verkuil@cisco.com \
--cc=kernel@pengutronix.de \
--cc=linux-media@vger.kernel.org \
--cc=matrandg@cisco.com \
--cc=mchehab@osg.samsung.com \
--cc=p.zabel@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).