On Tue, 22 May 2007 09:24:20 -0400 "Dmitry Torokhov" <[EMAIL PROTECTED]> wrote:
> Hi Stephen, > > Thank you for looking at the patch and working out quirks... > > On 5/21/07, Stephen Hemminger <[EMAIL PROTECTED]> wrote: > > + > > +#define X_AXIS_MIN 90 > > +#define X_AXIS_MAX 4000 > > +#define Y_AXIS_MIN 185 > > +#define Y_AXIS_MAX 4000 > > I am not sure that we want to use data from one particular laptop > here. Since we don't know a way to query the thouchscreen on a > particular box I'd stick with physical protocol limits (0 - 4095) and > have user calibrate the screen. Went back to 0 by 4096 on followup versions > Have you tried going through the calibration procedure with evtouch > driver? Does it not work or works incorrectly (I have no idea since I > don't have the hardware)? I tried it, and it corrects for offsets. > > +static irqreturn_t fujitsu_interrupt(struct serio *serio, > > + unsigned char data, unsigned int flags) > > +{ > > + struct fujitsu *fujitsu = serio_get_drvdata(serio); > > + struct input_dev *dev = fujitsu->dev; > > + > > + if (fujitsu->idx == 0) { > > + /* resync skip until start of frame */ > > + if (!(data & 0x80)) > > + return IRQ_HANDLED; > > The data sheet that I have shows the following for the first byte: > > 1 C 0 0 R S S S > > Where C is 1 while in calibration mode (which we don't use) and R is 1 > when no coordinate corection was done. My original patch had the check > "(data & 0xf8) != 80", did it give you issues with the data stream > coming out of the touchscreen? Or the missing fujitsu->idx = 0 is all > that is really needed? > The first byte is always: 0x88 Sample touch in middle is 88 72 11 4b 0f 89 71 11 4c 0f 89 72 11 4b 0f 8a 71 11 48 0f So original code that checks for (data & 0xf8) == 0x80 wouldn't work