提交 5f6f117c 编写于 作者: P Paul Cercueil 提交者: Dmitry Torokhov

Input: goodix - check the 'buffer status' bit before reading data

The MSB of the first byte read via I2C at the coordinates address
indicates whether the data is valid or ready (called "buffer status" in
the datasheets) when an interrupt is raised. Previously, this bit was
ignored, which resulted in a lot of incorrect detections of "finger
removed" events.
Signed-off-by: NPaul Cercueil <paul@crapouillou.net>
Acked-by: NBastien Nocera <hadess@hadess.net>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 c615dcb6
......@@ -101,6 +101,9 @@ static int goodix_ts_read_input_report(struct goodix_ts_data *ts, u8 *data)
return error;
}
if (!(data[0] & 0x80))
return -EAGAIN;
touch_num = data[0] & 0x0f;
if (touch_num > ts->max_touch_num)
return -EPROTO;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册