Input: edt-ft5x06: Poll the device if no interrupt is configured.
Not all systems have the interrupt line wired up, so switch to
polling the touchscreen off a timer if no interrupt line is
configured.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
input: edt-ft5x06: Handle unreliable TOUCH_UP events
The ft5x06 is unreliable in sending touch up events, so some
touch IDs can become stuck in the detected state.
Ensure that IDs that are unreported by the controller are
released.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
input: edt-ft5x06: Only look at the number of points reported
Register 0x02 in the FT5x06 is TD_STATUS containing the number
of valid touch points being reported.
Iterate over that number of points rather than all that are
supported on the device.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
input: edt-ft5x06: Only read data for number of points reported
Rather than always reading the maximum number of points supported
by the chip (which may be as high as 10), read the number of
active points first, and read data for just those.
In most cases this will result in less data on the I2C bus,
with only the maximum touch points taking more due to a second
read that has to configure the start address.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
input: edt-ft5x06: Fix patch reading only the number of points reported
Fix bad conflict resolution from upstream updates. Need to read
from tsdata->tdata_offset bytes, not from tsdata->offset.
Also fix logging of i2c read errors to cover both transactions.
Fixes:
7216fcfe2e5f ("input: edt-ft5x06: Only read data for number of points reported")
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>