Oppo update: LCD display tweak

Change-Id: I01f1f34aa4c868e035d44e665e0829438e5fbf26
Oppo change: Charging optimizations

Change-Id: Ic191fa485dcd0811359009e3904e3fd8a493bc32
find7: defconfig: Enable PM debugging

Change-Id: I4ed2473b795c97e3622fda20fd1ad28254a5ecb5
find7a: fix qpnp_charger.c #ifndef

Change-Id: I81016dad1e850c01a4418dc0b894ea86bace157b
Revert "find7a: fix qpnp_charger.c #ifndef"

I misread what was changing, this causes an unused function error and build failure.

Teaches me to merge blindly when tired...  :(

This reverts commit f7b4c025411903281659af3e555a70a3ca513b88.

Change-Id: Ia23fca20ff42cb4a453976ef8f990f858dff9206
synaptics: Disable gesture v2.0

This causes the gesture system to return KEY_F4 and a series of points
regardless of actual gesture drawn.

Change-Id: Ifa7981df63a6e675d0ca64ec40d2ef186a5807e5
Revert "ARM: dts: Disable RPM notifications for L2 GDHS collapse on Krait targets"

This reverts commit 3b337875a511188ac7dcd8b35b25d2962c12aff9.

Change-Id: I14e3603455ce27ad0570a2e2744497dd6c367301
Revert "msm: lpm_levels: remove rpm handshake in l2_gdhs mode"

This reverts commit a39a33514da9277b9725f5fd9beec734c9adf5af.

Change-Id: I946cc6e86874d214f68eb4518e78f4a9d1063b4d
add generic suspend backoff driver

This originally was in the wakelocks implementation for
apq8064 devices and older Android devices, but was removed
in KitKat for 8974 and newer devices.

Reimplement it in a more generic fashion, as:
1)  Wakelocking is better than suspend thrashing if suspend
is constantly aborting
2)  It spams dmesg less when suspend thrashing occurs

Change-Id: I62ee8debbd910e920d240a96cc38f1fd0a554898
defconfig: Enable suspend backoff driver

Change-Id: I7756d7f20dbf4ab64dd800274afec7c7655998fa
touchscreen: Split out gesture enable flags to allow individual control

TODO: Add music handling.  Some of the music flags overlap with
flashlight, requiring extra controls here.

Change-Id: I9749c09acce02f9826bc55737bfce10507303e1e
qpnp-charger: Add sleep during remaining EOC check function

Change-Id: I239c91ed9d1a21627904e1d35c6c467ea842e6b5
qpnp-charger: Enable vbatdet_lo IRQ on disconnect

This will cause the vbat_det lo IRQ to fire if pending.

It's safe to leave the IRQ enabled, since if it fires when
not charging, the IRQ handler will do nothing.  Also,
if you look at the code, this also will happen at EOC - the
IRQ will be enabled and never disabled until it fires.

Change-Id: I928e2db929f10d28dd37122b79bcc1853564e1c0
qpnp-charger: Fixup Oppo vbatdet configuration

Oppo sets vbatdet thresholds in the BQ24196 driver.  This isn't
working with the current code as that driver expects vbatdet as
an offset from vbatmax (either 100 or 300 mV).  This differs from
the standard qpnp-charger setup which wants a raw vbatdet threshold.

Most of these calls can just be removed in the future as the driver
never chooses anything other than 100 mV of offset, the exception
being when resume_charging is chosen - in which case the original
drivers seem to set a threshold of 100 mV above vddmax (which
effectively disables vbatdet...)

TODO:  Configure both the qpnp and BQ24196 vbatdet, since
the qpnp vbatdet is still used by some IRQs for driving
the charging state machine.

Change-Id: I84fb2cecbcc294345646190ab3fd53606e042fb0
find7op: defconfig: Sync with find7

Change-Id: Iec9daac5c39d1b2ebfd8d027458e8eac15511121
Oppo change: Adjust key backlight duration when the screen is turned on

Change-Id: I5fca0ff734a95fd9a13c5e899c18daebbe917077
cpufreq: Unified governor/scaling switching (squashed commits)

cpufreq: unified governor and scaling min and max switching governor scaling_min_freq and scaling_max_freq will be populated to all online cpus immediately

cpufreq: unified governor and scaling min and max switching use related_cpus to apply correctly to new online cpus

cpufreq: block hotplugging during multi-cpu operations

cpufreq: dont apply multi-cpu values if not changed

Change-Id: I199d47409d1ed15bbf9e4856d528344560c6f092
msm8974: Adapt memutils optimizations from msm8960pro

Preload farther to take advantage of the memory bus, and assume
64-byte cache lines.  Unroll some pairs of ldm/stm as well, for
unexplainable reasons.

Future enhancements should include,

- #define for how far to preload, possibly defined separately for
  memcpy, copy_*_user
- Tuning for misaligned buffers
- Tuning for memmove
- Tuning for small buffers
- Understanding mechanism behind ldm/stm unroll causing some gains
  in copy_to_user

BASELINE (msm8960pro):
======================================================================
memcpy 1000MB at 5MB       : took 808850 usec, bandwidth 1236.236 MB/s
copy_to_user 1000MB at 5MB : took 810071 usec, bandwidth 1234.234 MB/s
copy_from_user 1000MB at 5M: took 942926 usec, bandwidth 1060.060 MB/s
memmove 1000GB at 5MB      : took 848588 usec, bandwidth 1178.178 MB/s
copy_to_user 1000GB at 4kB : took 847916 usec, bandwidth 1179.179 MB/s
copy_from_user 1000GB at 4k: took 935113 usec, bandwidth 1069.069 MB/s
copy_page 1000GB at 4kB    : took 779459 usec, bandwidth 1282.282 MB/s

THIS PATCH:
======================================================================
memcpy 1000MB at 5MB       : took 346223 usec, bandwidth 2888.888 MB/s
copy_to_user 1000MB at 5MB : took 348084 usec, bandwidth 2872.872 MB/s
copy_from_user 1000MB at 5M: took 348176 usec, bandwidth 2872.872 MB/s
memmove 1000GB at 5MB      : took 348267 usec, bandwidth 2871.871 MB/s
copy_to_user 1000GB at 4kB : took 377018 usec, bandwidth 2652.652 MB/s
copy_from_user 1000GB at 4k: took 371829 usec, bandwidth 2689.689 MB/s
copy_page 1000GB at 4kB    : took 383763 usec, bandwidth 2605.605 MB/s

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Revert out a bunch of upstream camera changes

This fixes camera on find7a - need to see if
we can achieve this by backing out less

Signed-off-by: houst0nn <houstonn@gmail.com>

Change-Id: Idec86177abc265c38fd48e18d1320c5ae40b7f03