On Fri, 21 Mar 2008 22:43:14 +0000 Richard Purdie <[EMAIL PROTECTED]> wrote:
> Hi, > > On Fri, 2008-03-21 at 15:59 -0400, Dmitry Torokhov wrote: > > On Fri, Mar 21, 2008 at 08:40:19PM -0700, Kristoffer Ericson wrote: > > > This patch makes the jornada 7xx touchscreen work without tsdev. It > > > changes > > > the ABS values and makes sure the report_key is done in right order (for > > > tslib). > > > We also change the printk's to use ERR instead of INFO. > > > > > > > I dont think that this patch should be applied. The hardware does not > > report pressure and thus the driver should not generate pressure > > events. Order of events should not matter either, thet should all be > > accumulated until userspace gets EV_SYN/SYN_REPORT message and then > > processed all together. > > > > It sounds like tslib is pretty broken in that regard. Should we bring > > tsdev back till the issues are resolved? Richard? Tsdev was ugly and I've got both my machines working now. > > Lets not jump to that quite yet ;-). > > I don't understand why the order would matter either. Kristoffer, can > you confirm you really have to change the order of the events to make it > work? I will make a test of that. Im not sure that order makes any difference I've just replicated the order all other drivers seem to use. I had multiple errors so Im not yet certain what was required. For instance my ABS values was way off and caused alot of problems, and I used BIT() instead of BIT_MASK(). > > I've looked at the tslib input plugin: > > http://svn.berlios.de/viewcvs/*checkout*/tslib/trunk/tslib/plugins/input-raw.c?rev=52 > > and I think I can see the issue Kristoffer has hit: > > (ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit) * 8), &absbit) >= 0) && > (absbit & (1 << ABS_X)) && > (absbit & (1 << ABS_Y)) && (absbit & (1 << ABS_PRESSURE)))) > > since it seems tslib only looks at devices which export pressure data. > > Later on in the code, BTN_TOUCH should do that same job but that isn't > looked for in the initial check_fd() code. tslib can be easily fixed to > address that issue and if nobody else writes a patch I'll aim to do so > although it might not be for a few days. Sounds good. I submitted a patch to tslib maintainer while tsdev was still available to disclude ABS_PRESSURE as an requirement. However it seems like tsdev supplied its own ABS_PRESSURE and therefore hid some of the "bugs/errors" from me. > > Having said that I don't see why exporting ABS_PRESSURE of 0 and 1 isn't > a valid thing to do, they are pressure readings, just of a rather > limited range! > Personally I would say that ABS_PRESSURE isn't an big issue, if developers are aware of the necessity of ABS_PRESSURE then it shouldnt be any problems. Its better to expect ABS_PRESSURE by default and have the option to set it to 0-1 range rather than having to detect the specifics of each machine. Like if no pressure detection exists then just use on/off 1/0 mode, if pressure is detected then you can add a more proper range. > Cheers, > > Richard > > -- Kristoffer Ericson <[EMAIL PROTECTED]>