Re: [PATCH] [INPUT] ucb1400: add key interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sebastian,

On Thu, Apr 24, 2008 at 01:03:05PM +0200, Sebastian Siewior wrote:
> now the driver sends key events and feeds /dev/input/mice
> 
> Signed-off-by: Sebastian Siewior <bigeasy@xxxxxxxxxxxxx>
> ---
>  drivers/input/touchscreen/ucb1400_ts.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c
> index 9337352..ad14413 100644
> --- a/drivers/input/touchscreen/ucb1400_ts.c
> +++ b/drivers/input/touchscreen/ucb1400_ts.c
> @@ -326,12 +326,14 @@ static int ucb1400_ts_thread(void *_ucb)
>  			 */
>  			if (valid) {
>  				ucb1400_ts_event_release(ucb->ts_idev);
> +				input_report_key(ucb->ts_idev, BTN_TOUCH, 0);

Why don't you put input_repoer_key() inside ts_event_release()?

>  				valid = 0;
>  			}
>  
>  			timeout = MAX_SCHEDULE_TIMEOUT;
>  		} else {
>  			valid = 1;
> +			input_report_key(ucb->ts_idev, BTN_TOUCH, 1);

And here it should go into ucb1400_ts_evt_add(). Plus, you might want
to select some kind of pressure thresholds before reporting touch press
and release.

>  			ucb1400_ts_evt_add(ucb->ts_idev, p, x, y);
>  			timeout = msecs_to_jiffies(10);
>  		}

Thanks.

-- 
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux