public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: i2c/adp1653: set enable gpio to output
@ 2015-06-12  7:47 Uwe Kleine-König
  2015-06-12 21:13 ` Sakari Ailus
  2015-06-16 10:16 ` Pavel Machek
  0 siblings, 2 replies; 3+ messages in thread
From: Uwe Kleine-König @ 2015-06-12  7:47 UTC (permalink / raw)
  To: Pavel Machek, Sakari Ailus, Mauro Carvalho Chehab
  Cc: kernel, Alexandre Courbot, Linus Walleij, linux-media

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>
---
Hello,

this patch applies to next and is only necessary on top of 074c57a25fa2
([media] media: i2c/adp1653: Devicetree support for adp1653).

Note I plan to make the flags parameter mandatory for 4.3. So unless
this change gets into 4.2, would it be ok to let it go in via the gpio
tree?

Best regards
Uwe

 drivers/media/i2c/adp1653.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.1.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-06-16 10:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox