Revert "USB: Prevent system suspend when HSIC device is active"

This reverts commit 3a8838861ab19a3c00aed6e6e4286b59b21472d7.

Revert "USB: Allow skipping device resume during system resume"

This reverts commit 5127d0a51ecae14e711fff5f52415e225379183b.

Revert "USB: code cleanup in suspend/resume path (3rd try)"

This reverts commit 41d616cc2d5db47c7d107208913949c8e9ce698b.
Input: Send events one packet at a time

On heavy event loads, such as a multitouch driver, the irqsoff latency
can be as high as 250 us.  By accumulating a frame worth of data
before passing it on, the latency can be dramatically reduced.  As a
side effect, the special EV_SYN handling can be removed, since the
frame is now atomic.

This patch adds the events() handler callback and uses it if it
exists. The latency is improved by 50 us even without the callback.

Change-Id: Iebd9b1868ae6300a922a45b6d104e7c2b38e4cf5
Cc: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Tested-by: Ping Cheng <pingc@wacom.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>

Input: Improve the events-per-packet estimate

The events-per-packet estimate has so far been used by MT devices
only. This patch adjusts the packet buffer size to also accomodate the
KEY and MSC events.  Keyboards normally send one or two keys at a
time. MT devices normally send a number of button keys along with the
MT information.  The buffer size chosen here covers those cases, and
matches the default buffer size in evdev. Since the input estimate is
now preferred, remove the special input-mt estimate.

Reviewed-and-tested-by: Ping Cheng <pingc@wacom.com>
Tested-by: Benjamin Tissoires <benjamin.tissoires@enac.fr>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
msm_fb: Use an exclusive semaphore for Vsync IOCTL

Vsync IOCTL runs in a separate thread context and is independent of the
other display IOCTLs. Right now, we have the same semaphore shared
for Vsync IOCTL along with other IOCTLs. This will cause performance
drop if a Vsync enable/disable IOCTL thread waits to acquire the
semaphore since composition might be happening through Overlay/Blit
IOCTL. Hence, use a different semaphore for the Vsync IOCTL.

Change-Id: I190505740b289b01812b2a46d237854a31d047e8
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>