2016-03-27 20:53 GMT+02:00 Manuel Reimer <mail+linux-input@xxxxxxxxxxx>: > Hello, > > I'm writing on an usermode input driver. > > Currently my force feedback support just consists of some printf's as a > first try. > > My problem is, that it seems like as soon as I first sent something to my > open uinput device (some buttons that were pressed on the device) the uinput > backend seems to get into some bad state. > > My "force feedback thread" gets the "EV_UINPUT" event trigger, but if I try > to call > > ioctl(args->fduinput, UI_BEGIN_FF_UPLOAD, &upload); > > in this case, then the return value is "-1"... Check the value of errno just after the failed call (and use strerror to get a nice error message). > > The same code works without any problem if no buttons are pressed and > "fftest" is called directly after startup of the driver application. > > Can someone help me with debugging this problem? My understanding is, that > this call shouldn't return -1 if the "EV_UINPUT" event was successfully > received, right? You also need to check the event code, it must be UI_FF_UPLOAD. > > My system: > > $ uname -a > Linux manuelspc 4.4.5-1-ARCH #1 SMP PREEMPT Thu Mar 10 07:38:19 CET 2016 > x86_64 GNU/Linux > > Thank you very much in advance. > > Manuel > -- > 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 -- 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