Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 335908
b: refs/heads/master
c: c4f4925
h: refs/heads/master
v: v3
  • Loading branch information
Igor Grinberg authored and Dmitry Torokhov committed Nov 21, 2012
1 parent 48dc184 commit ff2a37a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c91cb7a75eaf65358aac5ea2b512ac60a9437ff4
refs/heads/master: c4f4925439f13a243aecfb36c693613603c0bfbd
6 changes: 5 additions & 1 deletion trunk/drivers/input/touchscreen/ads7846.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
5 changes: 3 additions & 2 deletions trunk/include/linux/spi/ads7846.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ struct ads7846_platform_data {
u16 debounce_rep; /* additional consecutive good readings
* required after the first two */
int gpio_pendown; /* the GPIO used to decide the pendown
* state if get_pendown_state == NULL
*/
* state if get_pendown_state == NULL */
int gpio_pendown_debounce; /* platform specific debounce time for
* the gpio_pendown */
int (*get_pendown_state)(void);
int (*filter_init) (const struct ads7846_platform_data *pdata,
void **filter_data);
Expand Down

0 comments on commit ff2a37a

Please sign in to comment.