Skip to content

Commit

Permalink
Input: ads7846 - fix gpio_pendown configuration
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Igor Grinberg authored and Dmitry Torokhov committed May 12, 2011
1 parent ebcaaad commit 1201e7e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/input/touchscreen/ads7846.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 1201e7e

Please sign in to comment.