summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorIgor Grinberg <grinberg@compulab.co.il>2012-11-21 11:00:10 +0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2012-11-22 01:09:56 +0400
commitc4f4925439f13a243aecfb36c693613603c0bfbd (patch)
treeaa8bc2513739c4729300d8c7dcf86184d9708d99 /drivers/input
parentc91cb7a75eaf65358aac5ea2b512ac60a9437ff4 (diff)
downloadlinux-c4f4925439f13a243aecfb36c693613603c0bfbd.tar.xz
Input: ads7846 - enable pendown GPIO debounce time setting
Some platforms need the pendown GPIO debounce time setting programmed. Since the pendown GPIO is handled by the driver, the debounce time should also be handled along with the pendown GPIO request. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/touchscreen/ads7846.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c
index f02028ec3db6..78e5d9ab0ba7 100644
--- a/drivers/input/touchscreen/ads7846.c
+++ b/drivers/input/touchscreen/ads7846.c
@@ -955,7 +955,8 @@ static int ads7846_resume(struct device *dev)
static SIMPLE_DEV_PM_OPS(ads7846_pm, ads7846_suspend, ads7846_resume);
-static int __devinit ads7846_setup_pendown(struct spi_device *spi, struct ads7846 *ts)
+static int __devinit ads7846_setup_pendown(struct spi_device *spi,
+ struct ads7846 *ts)
{
struct ads7846_platform_data *pdata = spi->dev.platform_data;
int err;
@@ -981,6 +982,9 @@ static int __devinit ads7846_setup_pendown(struct spi_device *spi, struct ads784
ts->gpio_pendown = pdata->gpio_pendown;
+ if (pdata->gpio_pendown_debounce)
+ gpio_set_debounce(pdata->gpio_pendown,
+ pdata->gpio_pendown_debounce);
} else {
dev_err(&spi->dev, "no get_pendown_state nor gpio_pendown?\n");
return -EINVAL;