summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/ads7846.c
diff options
context:
space:
mode:
authorIgor Grinberg <grinberg@compulab.co.il>2011-05-11 22:45:05 (GMT)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2011-05-12 15:28:57 (GMT)
commit1201e7e67634624aec89317cf308cd0d3d8d4770 (patch)
treef7449f3063d5505cd0b36aa3aa83fee81fa5c34c /drivers/input/touchscreen/ads7846.c
parentebcaaad9d5e8fd284b8dcf25a24999420f0f56d8 (diff)
downloadlinux-1201e7e67634624aec89317cf308cd0d3d8d4770.tar.xz
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>
Diffstat (limited to 'drivers/input/touchscreen/ads7846.c')
-rw-r--r--drivers/input/touchscreen/ads7846.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index e4ee43e..beb754f 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -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;