When the ADC get wrong datas and have to ignore remaining messages in a transfer turn, we should set ADC to powerdown mode instead of leaving it at previous operation mode, otherwise we can't get the correct pendown state and the irq will not trigger any more. After the last message is transfered, we should add msg_idx to let the code to skip out the loop. Signed-off-by: Jason Wang <jason77.wang@xxxxxxxxx> --- drivers/input/touchscreen/ads7846.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 5ddaeea..eab8b0b 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -729,7 +729,8 @@ static void ads7846_read_state(struct ads7846 *ts) case ADS7846_FILTER_IGNORE: packet->tc.ignore = true; - return; + msg_idx = ts->msg_count - 1; + continue; case ADS7846_FILTER_OK: ads7846_update_value(m, val); @@ -740,6 +741,8 @@ static void ads7846_read_state(struct ads7846 *ts) default: BUG(); } + } else { + msg_idx++; } } } -- 1.5.6.5 -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html