diff options
author | Zhangfei Gao <zhangfei.gao@linaro.org> | 2013-04-24 19:43:13 +0800 |
---|---|---|
committer | Zhangfei Gao <zhangfei.gao@linaro.org> | 2013-04-24 20:31:04 +0800 |
commit | c2cfd07af7f2bf3dd9ac95fa430a6eb0440aa099 (patch) | |
tree | 3937217cf6c7d0b19b6ea00aabb606ee4f9d6c0d | |
parent | 2532daaaca4dcb8bf22cbcb9e6501de47d3da975 (diff) |
Input: atmel_mXT224E fix bug of first_pressed
TS_DEBUG_ATMEL is removed when porting, caused finger_count error
Original code:
if (!ts->first_pressed)
TS_DEBUG_ATMEL("k3ts, %s: S%d@%d,%d\n", __func__,
idx + 1, ts->finger_data[idx].x, ts->finger_data[idx].y);
Signed-off-by: Zhangfei Gao <zhangfei.gao@linaro.org>
-rw-r--r-- | drivers/input/touchscreen/atmel_mXT224E.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/atmel_mXT224E.c b/drivers/input/touchscreen/atmel_mXT224E.c index 0f629c8c64e7..e7472f939def 100644 --- a/drivers/input/touchscreen/atmel_mXT224E.c +++ b/drivers/input/touchscreen/atmel_mXT224E.c @@ -30,6 +30,12 @@ #include <linux/of_gpio.h> #include <linux/pinctrl/consumer.h> +#ifdef TS_ATMEL_DEBUG +#define TS_DEBUG_ATMEL(fmt, args...) pr_info(fmt, ##args) +#else +#define TS_DEBUG_ATMEL(fmt, args...) +#endif + #define ATMEL_MXT224E_NAME "atmel_mxt224e" #define INFO_BLK_FID 0 @@ -695,7 +701,6 @@ static void msg_process_multitouch(struct atmel_ts_data *ts, uint8_t *data, uint } } if (!(ts->grip_suppression & BIT(idx))) { - if (!ts->first_pressed) ts->finger_count++; ts->finger_pressed |= BIT(idx); if (ts->id->version >= 0x10 && ts->pre_data[0] < 2) { @@ -731,6 +736,8 @@ static void compatible_input_report(struct input_dev *idev, input_report_key(idev, BTN_TOUCH, 1); } else { + TS_DEBUG_ATMEL("k3ts, %s: Touch report_key x = %d, y = %d, z = %d, w = %d\n ", __func__, + fdata->x, fdata->y, fdata->z, fdata->w); input_report_abs(idev, ABS_MT_TOUCH_MAJOR, fdata->z); input_report_abs(idev, ABS_MT_WIDTH_MAJOR, fdata->w); input_report_abs(idev, ABS_MT_POSITION_X, fdata->x); |