From: Vojtech P. <vo...@su...> - 2002-04-22 07:23:05
|
On Mon, Apr 22, 2002 at 10:04:54AM +1000, Brad Hards wrote: > 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. You need a way to read the initial values of all absolute valuators before you get any events. You may get none if the valuator doesn't ever change. > 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) EVIOCGBUS? What's that? > * finding out about the device features (EVIOCGBIT and EVIOCGABS) Add EVIOCGKEY, EVIOCGLED and EVIOCGSND to that. > * 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. It's also a value you need before you start reading the events, so it's handy there. > If it is important that that value is available before someone does anything > to the device, then another ioctl is probably appropriate. Might work as well. > 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. They will. -- Vojtech Pavlik SuSE Labs |