The patch titled wm97xx-core: fix race in pen up reporting has been removed from the -mm tree. Its filename was input-core-driver-for-wm97xx-touchscreens-race-fix.patch This patch was dropped because it was folded into input-core-driver-for-wm97xx-touchscreens.patch The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: wm97xx-core: fix race in pen up reporting From: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> Since the ts_reader will only report changes in pen down status avoid reseting the pen down flag once it is running. While we're at it, only schedule the ts_reader when the pen goes down - if the pen is already down then it is already scheduled. Signed-off-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx> Cc: Liam Girdwood <liam.girdwood@xxxxxxxxxxxxxxxx> Cc: Dmitry Torokhov <dtor@xxxxxxx> Cc: Jiri Kosina <jkosina@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/input/touchscreen/wm97xx-core.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff -puN drivers/input/touchscreen/wm97xx-core.c~input-core-driver-for-wm97xx-touchscreens-race-fix drivers/input/touchscreen/wm97xx-core.c --- a/drivers/input/touchscreen/wm97xx-core.c~input-core-driver-for-wm97xx-touchscreens-race-fix +++ a/drivers/input/touchscreen/wm97xx-core.c @@ -267,6 +267,7 @@ EXPORT_SYMBOL_GPL(wm97xx_config_gpio); static void wm97xx_pen_irq_worker(struct work_struct *work) { struct wm97xx *wm = container_of(work, struct wm97xx, pen_event_work); + int pen_was_down = wm->pen_is_down; /* do we need to enable the touch panel reader */ if (wm->id == WM9705_ID2) { @@ -301,16 +302,24 @@ static void wm97xx_pen_irq_worker(struct } /* If the system is not using continuous mode or it provides a - * pen down operation then start scheduling polls. Otherwise - * the machine driver is responsible for scheduling reads. + * pen down operation then we need to schedule polls while the + * pen is down. Otherwise the machine driver is responsible + * for scheduling reads. */ if (!wm->mach_ops->acc_enabled || wm->mach_ops->acc_pen_down) { - /* Data is not availiable immediately after pen down. */ - queue_delayed_work(wm->ts_workq, &wm->ts_reader, 1); + if (wm->pen_is_down && !pen_was_down) { + /* Data is not availiable immediately on pen down */ + queue_delayed_work(wm->ts_workq, &wm->ts_reader, 1); + } + + /* Let ts_reader report the pen up for debounce. */ + if (!wm->pen_is_down && pen_was_down) + wm->pen_is_down = 1; } if (!wm->pen_is_down && wm->mach_ops->acc_enabled) wm->mach_ops->acc_pen_up(wm); + wm->mach_ops->irq_enable(wm, 1); } _ Patches currently in -mm which might be from broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx are git-alsa-tiwai.patch git-arm.patch input-core-driver-for-wm97xx-touchscreens.patch input-core-driver-for-wm97xx-touchscreens-race-fix.patch input-add-chip-driver-for-wm9705-touchscreen.patch input-add-chip-driver-for-wm9712-touchscreen.patch input-add-chip-driver-for-wm9713-touchscreen.patch input-driver-for-wm97xx-touchscreens-in-streaming-mode-on-mainstone.patch input-build-system-and-maintainers-entry-for-wm97xx-touchscreen-drivers.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html