Re: [linux-usb-devel] USB interrupt URB programming question

2007-02-16 Thread Sven Anders
Oliver Neukum schrieb: > Am Freitag, 16. Februar 2007 18:58 schrieb Sven Anders: >> Variant 1: >> If the completion handler decides, that there is no finger on the touchpad >> any more, it does not call usb_submit_urb() again. The completion handler >> stops. Via an kernel timer I will call the

Re: [linux-usb-devel] USB interrupt URB programming question

2007-02-16 Thread Oliver Neukum
Am Freitag, 16. Februar 2007 18:58 schrieb Sven Anders: > Variant 1: >  If the completion handler decides, that there is no finger on the touchpad >  any more, it does not call usb_submit_urb() again. The completion handler >  stops. Via an kernel timer I will call the completion handler to test, i

Re: [linux-usb-devel] USB interrupt URB programming question

2007-02-16 Thread Alan Stern
On Fri, 16 Feb 2007, Sven Anders wrote: > Some idea I had myself. > Is it possible to use a mix? My idea is as follows: > > Variant 1: > If the completion handler decides, that there is no finger on the touchpad > any more, it does not call usb_submit_urb() again. The completion handler > stop

Re: [linux-usb-devel] USB interrupt URB programming question

2007-02-16 Thread Sven Anders
Alan Stern schrieb: > On Thu, 15 Feb 2007, Sven Anders wrote: > >> 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

Re: [linux-usb-devel] USB interrupt URB programming question

2007-02-15 Thread Alan Stern
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

Re: [linux-usb-devel] USB interrupt URB programming question

2007-02-15 Thread Sven Anders
Alan Stern wrote: >>> Isn't that exactly what it's supposed to do? What good is a driver if it >>> doesn't wait for the device to send data? >> Right, it waits, but I does not if I want it to wait... > > You mean, sometimes you want it to wait for data and sometimes you don't? > I still don't

Re: [linux-usb-devel] USB interrupt URB programming question

2007-02-15 Thread Oliver Neukum
Am Donnerstag, 15. Februar 2007 21:33 schrieb Sven Anders: > Oliver Neukum schrieb: > > Am Donnerstag, 15. Februar 2007 10:27 schrieb Sven Anders: > >> My problem is: If I decide (upon the data I received from the touchpad), > >> that > >> there isn't a finger any longer on the pad, I want to stop

Re: [linux-usb-devel] USB interrupt URB programming question

2007-02-15 Thread Sven Anders
Oliver Neukum schrieb: > Am Donnerstag, 15. Februar 2007 10:27 schrieb Sven Anders: >> My problem is: If I decide (upon the data I received from the touchpad), that >> there isn't a finger any longer on the pad, I want to stop the calling of the >> 'atp_complete' function until I'm sure the touchpa

Re: [linux-usb-devel] USB interrupt URB programming question

2007-02-15 Thread Alan Stern
On Thu, 15 Feb 2007, Sven Anders wrote: > On Wed, 14 Feb 2007, Sven Anders wrote: > >> After I called > >> usb_fill_int_urb(dev->urb, udev, > >> usb_rcvintpipe(udev, int_in_endpointAddr), > >> dev->data, dev->datalen, atp_complete, dev, 1);

Re: [linux-usb-devel] USB interrupt URB programming question

2007-02-15 Thread Oliver Neukum
Am Donnerstag, 15. Februar 2007 10:27 schrieb Sven Anders: > My problem is: If I decide (upon the data I received from the touchpad), that > there isn't a finger any longer on the pad, I want to stop the calling of the > 'atp_complete' function until I'm sure the touchpad is touched again. Then I >

Re: [linux-usb-devel] USB interrupt URB programming question

2007-02-15 Thread Sven Anders
Hello Alan! On Wed, 14 Feb 2007, Sven Anders wrote: >> After I called >> usb_fill_int_urb(dev->urb, udev, >> usb_rcvintpipe(udev, int_in_endpointAddr), >> dev->data, dev->datalen, atp_complete, dev, 1); >> >> the driver waits until the USB

Re: [linux-usb-devel] USB interrupt URB programming question

2007-02-14 Thread Alan Stern
On Wed, 14 Feb 2007, Sven Anders wrote: > Hello! > > I want to change the actual "appletouch.c" USB driver and run into a problem. > > > After I called > > usb_fill_int_urb(dev->urb, udev, > usb_rcvintpipe(udev, int_in_endpointAddr), >