From: Pavel Machek <pavel@ucw.cz>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Sakari Ailus <sakari.ailus@iki.fi>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
kernel@pengutronix.de, Alexandre Courbot <gnurou@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
linux-media@vger.kernel.org
Subject: Re: [PATCH] media: i2c/adp1653: set enable gpio to output
Date: Tue, 16 Jun 2015 12:16:44 +0200 [thread overview]
Message-ID: <20150616101644.GB25899@amd> (raw)
In-Reply-To: <1434095248-31057-1-git-send-email-u.kleine-koenig@pengutronix.de>
On Fri 2015-06-12 09:47:28, Uwe Kleine-König wrote:
> Without setting the direction of a gpio to output a call to
> gpiod_set_value doesn't have a defined outcome.
>
> Furthermore this is one caller less that stops us making the flags
> argument to gpiod_get*() mandatory.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
> diff --git a/drivers/media/i2c/adp1653.c b/drivers/media/i2c/adp1653.c
> index c70ababce954..5dd39775d6ca 100644
> --- a/drivers/media/i2c/adp1653.c
> +++ b/drivers/media/i2c/adp1653.c
> @@ -465,7 +465,7 @@ static int adp1653_of_init(struct i2c_client *client,
>
> of_node_put(child);
>
> - pd->enable_gpio = devm_gpiod_get(&client->dev, "enable");
> + pd->enable_gpio = devm_gpiod_get(&client->dev, "enable", GPIOD_OUT_LOW);
> if (!pd->enable_gpio) {
> dev_err(&client->dev, "Error getting GPIO\n");
> return -EINVAL;
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
prev parent reply other threads:[~2015-06-16 10:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-12 7:47 [PATCH] media: i2c/adp1653: set enable gpio to output Uwe Kleine-König
2015-06-12 21:13 ` Sakari Ailus
2015-06-16 10:16 ` Pavel Machek [this message]
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=20150616101644.GB25899@amd \
--to=pavel@ucw.cz \
--cc=gnurou@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linus.walleij@linaro.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=sakari.ailus@iki.fi \
--cc=u.kleine-koenig@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