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

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

 



On Fri, Apr 25, 2008 at 07:45:35PM +0200, Sebastian Siewior wrote:
> * Dmitry Torokhov | 2008-04-25 11:26:23 [-0400]:
> 
> >Hi Sebastian,
> Hello Dimitry,
> 
> >> 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()?
> yep, looks better.
> 
> >>  				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().
> same..
> 
> >Plus, you might want
> >to select some kind of pressure thresholds before reporting touch press
> >and release.
> Sure but depending on what? Are there any drivers doing this allready?
> I didn't find any on my grep.
> Since these values are HW specifc they should be some userspace control
> (like for max/min x/y).

Synaptics for example does it. You just need to guesstimate what
values are most likely to work by default (since you are trying to
provide compatibility with a legacy interface, just to get user going)
and then leave fine-tuning to evdev/tslib.

-- 
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