msm8660: improve robustness of cypress-touchkey driver

Overview:
  * fixes issue where lights would not come on after resume
  * fixes i2c writes being done during driver suspend
  * improves overall stability and specifically bln stability
  * support dropped for devices other than I717, I727, and T989
  * quietened debug output; define DEBUG to reenable

Details of changes:
  * update driver using CM's victory kernel as a guide
    - move driver variables into structure
    - replace touchkey_enable tracking variable
    - implement backlight_onoff values in driver structure
    - implement is_delay_led_on and is_key_pressed
      (fixes: lights would not always turn on at resume)
    - discontinue use of the deprecated IRQF_DISABLED flag
    - add mutex locking to protect against race conditions
  * encapsulate device-specific code instead of sprinkling
    #if defined(CONFIG_*) all throughout
  * remove code that does not apply to Skyrocket/Hercules/Note
    - if we can't test the device, then we can't support it
    - remove touch_resume_func
  * remove unnecessary features that are not in victory's driver
    - remove raw and sensitivity interfaces
  * add mutex to bln driver
  * standardize in-driver prints to prepend "[TKEY]"
  * clean up compile warnings

Change-Id: Ia182bd7ea3092b3e10f0be5332cfae5081bd20d9
Merge "msm8660: improve robustness of cypress-touchkey driver" into jellybean
input: cypress: Fix power on sequence for Quincy hardware

 * Remove the "if (false)" block that crept in.

Change-Id: Iba6064eea4f5a4f683df69a52edd42d2d9647eea
video: s6e8aa0: Fix early suspend level

 * Suspend a little bit later so that electron beam works.

Change-Id: I0709f808328e062bf3cf883fd81cce8b0f6c4e50
msm_fb: Handle vsync interrupt properly on MDP 3.03 targets

Handle enabling/disabling the vsync interrupt and mdp clock
enabling/disabling in a better way on MDP 3.03 targets. This
will avoid target crashes due to unclocked register access.

CRs-fixed: 388751
Change-Id: I5c4a409772464ce7d06869374dcba5ad7e335955
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm_fb: Return ioctl on vsync interrupt disable

Before the vsync interrupt gets disabled, initialize the completion
structure and then disable the interrupt. This enables the ioctl to
return successfully in all the cases.

Change-Id: I6a7c233f818a773d00497502213d1ecf8fe9dc24
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
msm_fb: display: add spinlock to protect dma status.

During dma transfer to interface host the status of the dma
needs to be protected in the smp environment.

Change-Id: I02b4f046de7f693bb098343b7345c4aa6ca395bd
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
Revert "msm_fb: display: Attach and detach MDP IOMMU on suspend/resume"

This reverts commit 0ffdb09c5b079558df4af22e7d89403ed43f9bb6.

Change-Id: Ib899b768d96c90a4cf41d9e7a86ba1a5647ad69d
msm_fb: display: Increase MDP IOMMU buffer mapping size

Double the MDP IOMMU buffer mapping size to allow overfetching
by hardware for boundary conditions and avoid system crashes
due to page faults.

CRs-Fixed: 378108
CRs-Fixed: 364478
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Change-Id: Ib19af6b06ab06455acaffcca33830e0487bb0836
(cherry picked from commit 1ed0dae869f6384d23322b78691852d70c573174)
video: msm: Workaround an MDP crash on 8660

 * If an impossibly high clock rate is needed while composing with MDP,
   the hardware will lock up when BLT mode is used.
 * Reproducible on the Galaxy Note by long-pressing power while the
   camera preview is running.
 * Just fail the overlay set so that userspace switches to GPU.

Change-Id: I2a69f967efb90a08efaadbe2d13584ca450f9805
Merge branch 'jellybean' of git://github.com/CyanogenMod/android_kernel_samsung_msm8660-common into jellybean-test
Revert "random: remove rand_initialize_irq()"

This reverts commit b6b847a93be87fc9974d8232984668a5a59754df.

Conflicts:

	kernel/irq/manage.c
Revert "random: add tracepoints for easier debugging and verification"

This reverts commit 1edbd889fa5c0343d817ae6fe44ab95870a096b4.
Revert "random: use lockless techniques in the interrupt path"

This reverts commit ebb6006e3be88bb15328887dec4a8c3b7c0138b6.

Conflicts:

	drivers/char/random.c
Revert "random: make 'add_interrupt_randomness()' do something sane"

This reverts commit aa88dea2270f685349ab7b92169600452fe73b62.

Conflicts:

	drivers/char/random.c