提交 1201e7e6 编写于 作者: I Igor Grinberg 提交者: Dmitry Torokhov

Input: ads7846 - fix gpio_pendown configuration

The pendown gpio was requested but not configured for input.
Configure it for input.
Signed-off-by: NIgor Grinberg <grinberg@compulab.co.il>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 ebcaaad9
......@@ -966,6 +966,13 @@ static int __devinit ads7846_setup_pendown(struct spi_device *spi, struct ads784
pdata->gpio_pendown);
return err;
}
err = gpio_direction_input(pdata->gpio_pendown);
if (err) {
dev_err(&spi->dev, "failed to setup pendown GPIO%d\n",
pdata->gpio_pendown);
gpio_free(pdata->gpio_pendown);
return err;
}
ts->gpio_pendown = pdata->gpio_pendown;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册