提交 a33c380e 编写于 作者: U Uwe Kleine-König

media: i2c/adp1653: set enable gpio to output

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.
Acked-by: NSakari Ailus <sakari.ailus@iki.fi>
Acked-by: NPavel Machek <pavel@ucw.cz>
Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
上级 7d891dbe
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册