mako LCD: keep RGB custom colors alive after screen off/on

When the back-light turns back on, reset the RGB values set in
sysfs (/sys/devices/platform/kcal_ctrl.0/kcal)

Conflicts:
	arch/arm/mach-msm/lge/mako/board-mako-display.c
	drivers/video/backlight/lm3530_bl.c
intelli_plug: use rq_stats to help detect artificial or constant loads

benchmarks often create fake / artificial loads at a constant rate.  These
type of loads are not detected corectly by run average algorithms. Use
the run queue stats to help detect these cases and bring up the cores in
correspondence.

bump version to 1.2

Signed-off-by: faux123 <reioux@gmail.com>
intelli_plug: use mp_decision() algorithm for core 3 and 4

This replaces the simplistic check for run queue thresholds with a more
sophisticate algorithm with time awareness

bump version to 1.3

Signed-off-by: faux123 <reioux@gmail.com>
Revert "android/lowmemorykiller: Wait for memory to be freed"

This reverts commit 7941328324e5cbf11bf3b7ae9d6bd651efad0769.
intelli_plug: tweak mp_decsion parameters and remove unused logic

Signed-off-by: faux123 <reioux@gmail.com>
intelli_plug: bump threshold slightly for better response

Signed-off-by: faux123 <reioux@gmail.com>
wip: intelli_plug: change logic for better benchmark performance

Signed-off-by: faux123 <reioux@gmail.com>
overclocking: remove memory subsystem OC, increase Max OC to 1.944 GHz

Signed-off-by: faux123 <reioux@gmail.com>

Conflicts:
	arch/arm/mach-msm/acpuclock-krait.c
	arch/arm/mach-msm/lge/j1/board-j1-regulator.c
Overclocking: cut off normal max OC @1.84 GHz and make 1.944 GHz as ultimate

Signed-off-by: faux123 <reioux@gmail.com>
cpufreq: Add Overclock compile directives. Also remove deprecated logic

Signed-off-by: faux123 <reioux@gmail.com>
intelli_plug: use mp_decision to reduce online persistence count for cores

this should bring down the cores faster when run queue is low
also optimized code a bit using local vars

Signed-off-by: faux123 <reioux@gmail.com>
intelli_plug: restore hysteresis value for quad back to 8

this will reduce the jumpiness of hotplug decisions

Signed-off-by: faux123 <reioux@gmail.com>
speaker amp control: initial release for speaker amp control

Signed-off-by: faux123 <reioux@gmail.com>

Conflicts:
	arch/arm/mach-msm/lge/j1/board-j1-sound.c
speaker amp control: allowed all configurable registers to be adjusted

Signed-off-by: faux123 <reioux@gmail.com>
ASoC: msm: Add support for 4-pole extension cable.

- Add the support to report lineout device when inserted plug
  has high impedance on microphone line.
- This feature is enabled only with gpio headset detection.

Signed-off-by: Ravi Kumar Alamanda <ralama@codeaurora.org>
(cherry picked from commit 07b6bd6a9a1e431a86efa76b14030d882ee7771b)
(cherry picked from commit 39c0e134f67fcab824f1457a256c4fbf2525c347)

Change-Id: I6d4e3f147433ee9c0cc313118b540fee0b90f45f
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
ASoC: WCD9310: Defer the setup of headphone removal detection.

After the inserted accessory is detected as a valid headphone,
polling is performed on the microphone to correct the accessory
detection in case it was wrongly identified as a headphone.

It was observed that at the end of polling, headphone removal
interrupt was fired, causing headphone playback to stop. Fixed
by deferring the headphone removal setup until either polling is
complete or polling detects a removal

CRs-fixed: 384967
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
(cherry picked from commit afc86431f330ee51f7980b620bef75935422c764)
(cherry picked from commit f87a8b2658964249917c815719d15abedd03771e)

Change-Id: Ic2c04aa300fc029957c71294e153aef479967b84
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
ASoC: wcd9310: reduce mbhc button release GPIO debounce time.

Current GPIO debounce time is too long so it delays next button
press detection.  Reduce this debounce time so driver can detect
next button press and release quickly.
Typically mic voltage ramps up within few milliseconds after button
release so 50ms is long enough.

Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
(cherry picked from commit db606b0a39452c90e26692c22300c390f5822f29)
(cherry picked from commit 96e92e0a22a0c54f9cfda447d346c1a2dd9f4639)

Change-Id: Ibf0aa4d4c07fab9cd50021cb0e256ee23b320059
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
ASoC: wcd9310: Turn on EAR DAC and PA at the same time.

Turn on EAR DAC and EAR PA at the same time to avoid pop
at start of playback.

CRs-Fixed: 386288
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
(cherry picked from commit 7c85d71830e1781c113cf1d69234169e8feb31c9)
(cherry picked from commit deb584f6a8788dcda97a9d83038103ebd2576771)

Change-Id: Ib50f6a488fe93595423bae30164073cc25b90076
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
ASoC: wcd9310: Enhance OCP reporting logic.

CODEC has over current protection(OCP) finite state
machine for both left and right headphone while CODEC
driver tries to delay reporting of OCP event after
CODEC reporting OCP two times. Current CODEC driver
implementation results in unlocking one of headphone
power amplifier when OCP reported on both headphone.
Change the behavior to report OCP event for a give
headphone immediately if OCP already occurs on opposite
headphone.

CRs-fixed: 339620
Signed-off-by: Patrick Lai <plai@codeaurora.org>
(cherry picked from commit c2d833d524c1230c72f2d078b543baba7a8db26f)
(cherry picked from commit 6b8cacf2d5ed669048c3813b56851c10fe5c5af1)

Change-Id: Iea28c8baa1a6372dcb4c0214ec0e74bfc483f563
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
ASoC: wcd9310: Fix NULL pointer dereference.

If sound card is not yet initialized the platform device's private data
is not set either.  Check if private data is NULL before use it.

CRs-fixed: 400055
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
(cherry picked from commit d6e48bd07516ecc683a995ebf8eedf080f14016d)
(cherry picked from commit 87ba6ce49d4f50ad089702135e84ecad5446bfad)

Change-Id: I94e45366d8f316ea8e69def48cc926cdd971f5a6
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>

Conflicts:
	sound/soc/codecs/wcd9310.c