Commit 937ad5c1 authored by Soeren Sonnenburg's avatar Soeren Sonnenburg Committed by Dmitry Torokhov

Input: appletouch - another fix for idle reset logic

Make sure we reset idlecount when we get a good (non-empty) packet.
Signed-off-by: default avatarSoeren Sonnenburg <kernel@nn7.de>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent aefca8ba
...@@ -502,18 +502,23 @@ static void atp_complete(struct urb* urb) ...@@ -502,18 +502,23 @@ static void atp_complete(struct urb* urb)
/* reset the accumulator on release */ /* reset the accumulator on release */
memset(dev->xy_acc, 0, sizeof(dev->xy_acc)); memset(dev->xy_acc, 0, sizeof(dev->xy_acc));
}
/* Geyser 3 will continue to send packets continually after
the first touch unless reinitialised. Do so if it's been
idle for a while in order to avoid waking the kernel up
several hundred times a second */
/* Geyser 3 will continue to send packets continually after if (atp_is_geyser_3(dev)) {
the first touch unless reinitialised. Do so if it's been if (!x && !y && !key) {
idle for a while in order to avoid waking the kernel up
several hundred times a second */
if (!key && atp_is_geyser_3(dev)) {
dev->idlecount++; dev->idlecount++;
if (dev->idlecount == 10) { if (dev->idlecount == 10) {
dev->valid = 0; dev->valid = 0;
schedule_work(&dev->work); schedule_work(&dev->work);
} }
} }
else
dev->idlecount = 0;
} }
input_report_key(dev->input, BTN_LEFT, key); input_report_key(dev->input, BTN_LEFT, key);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment