Files
OpenCellular/chip
Nicolas Boichat 58374f7d26 usb_hid_touchpad: Add touch event to FIFO during suspend
Similarly to what we have done with keyboard events, we put touch
events in a FIFO. The AP will need to interpret the timestamp
in the events to be able to process the events correctly tough.

Resume should typically take about 50ms, so a 8-event long FIFO
should be good enough. Also, we bypass the FIFO altogether in most
cases, when the USB interface is not suspended.

BRANCH=none
BUG=b:35775048
TEST=Connect hammer, force autosuspend using:
   DEVICE=$(dirname $(grep 5022 /sys/bus/usb/devices/*/idProduct))
   echo 500 > $DEVICE/power/autosuspend_delay_ms
   echo auto > $DEVICE/power/control
   Look at evtest output.
   Wait a second, make a swipe, see that events are received in
   a very short amount of time after resume (every EP interval/2ms),
   but the event timestamps show that some of them are older.

Change-Id: If6ab56396f7d564b19e6c3c528847196ffa4d849
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/612221
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2017-08-16 06:03:49 -07:00
..