From: Brad H. <bh...@bi...> - 2002-04-22 00:05:24
|
On Wed, 17 Apr 2002 16:27, Brad Hards wrote: > On Mon, 15 Apr 2002 23:44, Vojtech Pavlik wrote: > <snip> > > > May I suggest one more change? > > > > dev->dinfo.bustype to dev->id.bus > > dev->devinfo.id_vendor ro dev->id.vendor > > Mostly done. I kept bustype, because it is more descriptive, and because it > helps the assignment operators line up :) I have done a similar change to the EVIOCGABS ioctl. It now returns input_absinfo, rather than int[5]. Patches against evtest and 2.4.19-pre7 are attached, including the previous patch (so you only need these ones). Let me know if you'd rather an incremental patch. I have commented out the current value element. I am unconvinced that it is an appropriate thing to return from this ioctl. My tutorial works in stages - * finding out things about the event system (EVIOCGVERSION) * finding out about the device identity (EVIOCGNAME and EVIOCGID, maybe EVIOCGBUS if it works) * finding out about the device features (EVIOCGBIT and EVIOCGABS) * getting information from the device (read()) * sending information to the device (write()) * modifying the device behaviour (eg EVIOCGREP and EVIOCSREP) I think that the first element (now ->curr_value) is a different concept to the programmer compares to the rest of the features identified with EVIOCGABS. If it is important that that value is available before someone does anything to the device, then another ioctl is probably appropriate. PLEASE NOTE: I need to know if these patches are going to be accepted and pushed into the main-line kernels, because they affect the documentation. Please let me know ASAP which way you are going to go. Brad |