[asus-port] Small touchscreen driver fix

From: KiberGus <kibergus_at_gmail.com>
Date: Sat, 17 Mar 2007 12:18:23 +0300

I want to set up usual X server on my PDA, so I use evtouch driver
rather than tslib. It ocurred, that it handles events a bit
differently: when you stop touching screen tslib ignores information
about cursor position, but evtouch doesn't.
The bug defenetely is in A620 driver, but the same problem can be with
other drivers. When you release pen, driver still sends coordinates,
of course they are not set, so (0, 0) is sent. As a result cursor is
firstly moved to the left bottom corner of the screen and only then
mous button release event is generated. So you actually can't click on
any button.
 Can you add on line 63 of arch/arm/mach-pxa/asus620/asus620_ts.c one
more if operator, like this:

static void report_touchpanel (int x, int y, int pressure)
{
        //printk("report (%d, %d) with pressure %d\n", x, y, pressure);
        input_report_key (idev, BTN_TOUCH, pressure != 0);
        input_report_abs (idev, ABS_PRESSURE, pressure);
        // Don't send coordinates if pen was released, driver is confused
        // and click occurs in left bottom corner
        if (pressure)
                {
                input_report_abs (idev, ABS_X, x);
                input_report_abs (idev, ABS_Y, y);
                }
        input_sync (idev);
}
Received on Sat Mar 17 2007 - 04:18:27 EST

This archive was generated by hypermail 2.2.0 : Sat Mar 17 2007 - 04:18:48 EST