On Thu, 15 Feb 2007, Sven Anders wrote:

> It constantly sent data, because the touchpad consist of temperature sensors
> and the driver has to constantly save the current value to get precise
> readings. I think that is the reason why the device did not stop sending
> the data.

> I tried to stop resubmitting (by NOT calling "usb_submit_urb" again) and I
> hoped the the interrupt handler will continue when the touchpad is pressed
> again, but it does not work.

> A longer interval would solve it in some way:
>   I could get constantly new temperature update (each second or more) and if
>   the touchpad is touch, I can reduce the interval to the normal settings.

It sounds like your completion handler should not call usb_submit_urb().

Instead you should use a kernel timer.  When the timer expires, its
callback routine should call usb_submit_urb().  The callback should also
determine whether the touchpad is being pressed, use that information to
decide how long the next timer interval will be, and restart the timer.

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to