<br><br><div class="gmail_quote">2012/6/12 Tony Lindgren <span dir="ltr"><<a href="mailto:tony@atomide.com" target="_blank">tony@atomide.com</a>></span><br><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
* Zumeng Chen <<a href="mailto:zumeng.chen@gmail.com">zumeng.chen@gmail.com</a>> [120611 07:05]:<br>
<div class="im">> If we don't set proper debouce time for ads7846, then there are<br>
> flooded interrupt counters of ads7846 responding to one time<br>
> touch on screen, so the driver couldn't work well.<br>
><br>
> And since most OMAP3 series boards pass NULL pointer of board_pdata<br>
> to omap_ads7846_init, so it's more proper to set it in driver level<br>
> after having gpio_request done.<br>
><br>
> This patch has been validated on 3530evm.<br>
><br>
> Signed-off-by: Zumeng Chen <<a href="mailto:zumeng.chen@gmail.com">zumeng.chen@gmail.com</a>><br>
> Signed-off-by: Syed Mohammed Khasim <<a href="mailto:khasim@ti.com">khasim@ti.com</a>><br>
> Signed-off-by: Tony Lindgren <<a href="mailto:tony@atomide.com">tony@atomide.com</a>><br>
<br>
</div>Please remove my Signed-off-by, where does that come from?<br></blockquote><div>HI Tony,<br><br>This comes from git://<a href="http://arago-project.org/git/projects/linux-omap3.git">arago-project.org/git/projects/linux-omap3.git</a><br>
The commit ID is 53c5ec31, we set gpio_debounce in arch/board <br>level.<br><br>+static void ads7846_dev_init(void)<br>+{<br>+       if (gpio_request(OMAP3_EVM_TS_GPIO, "ADS7846 pendown") < 0)<br>+               printk(KERN_ERR "can't get ads7846 pen down GPIO\n");<br>
+<br>+       gpio_direction_input(OMAP3_EVM_TS_GPIO);<br>+<br>+       omap_set_gpio_debounce(OMAP3_EVM_TS_GPIO, 1);<br>+       omap_set_gpio_debounce_time(OMAP3_EVM_TS_GPIO, 0xa);<br>+}<br><br>in 3.4 kernel, I think we can set pendown in driver level. this is the story.<br>
<br>Regards,<br>Zumeng<br></div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
Tony<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
>  drivers/input/touchscreen/ads7846.c |    2 ++<br>
>  1 files changed, 2 insertions(+), 0 deletions(-)<br>
><br>
> diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c<br>
> index f02028e..a82a5fb 100644<br>
> --- a/drivers/input/touchscreen/ads7846.c<br>
> +++ b/drivers/input/touchscreen/ads7846.c<br>
> @@ -61,6 +61,7 @@<br>
><br>
>  /* this driver doesn't aim at the peak continuous sample rate */<br>
>  #define      SAMPLE_BITS     (8 /*cmd*/ + 16 /*sample*/ + 2 /* before, after */)<br>
> +#define      DEBOUNCE_TIME   310 /* About 10 ms */<br>
><br>
>  struct ts_event {<br>
>       /*<br>
> @@ -980,6 +981,7 @@ static int __devinit ads7846_setup_pendown(struct spi_device *spi, struct ads784<br>
>               }<br>
><br>
>               ts->gpio_pendown = pdata->gpio_pendown;<br>
> +             gpio_set_debounce(pdata->gpio_pendown, DEBOUNCE_TIME);<br>
><br>
>       } else {<br>
>               dev_err(&spi->dev, "no get_pendown_state nor gpio_pendown?\n");<br>
> --<br>
> 1.7.5.4<br>
><br>
</div></div></blockquote></div><br>