dect
/
linux-2.6
Archived
13
0
Fork 0

Input: ads7846 - fix gpio_pendown configuration

The pendown gpio was requested but not configured for input.
Configure it for input.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
Igor Grinberg 2011-05-11 15:45:05 -07:00 committed by Dmitry Torokhov
parent ebcaaad9d5
commit 1201e7e676
1 changed files with 7 additions and 0 deletions

View File

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