msm8x60_celox: Clean-up & optimize Ion heap sizes and layout

Clean-up:
*PMEM is deprecated^9001 (OVER 9,000)
*FB_MSM_MIPI_S6E8AA0_HD720_PANEL is not enabled for any celox device
*FB_MSM_TVOUT is not enabled for any celox device
*FB_MSM_HDMI_AS_PRIMARY is not enabled for any celox device
*SEC_KERNEL_REBASE_FOR_PMEM_OPTIMIZATION is not enabled for any celox device
*"workaournd for kernel memory crash by TZBSP XPU" is not present in the stock Samsung kernel
*MSM8660 does not support writeback

Optimizations:
*Removed writeback heap (MSM8660 doesn't use writeback)
*Removed qsecom heap
*Shrunk SF heap to a suitable size
*Shrunk camera heap to a suitable size
*SMI region (64MB) is now being fully utilized (previously there were 8MB of unused RAM in the SMI region)
*Userspace now has a ~65MB increase in real RAM (847MB total), as seen in About phone

Change-Id: I26cead93b762f68b2123f9f13f483a338907f8d0
Signed-off-by: Sultanxda <sultanxda@gmail.com>
celox/q1: Update defconfigs

*MSM8660 doesn't support writeback
*qseecom isn't used by the t769, and it's wasting memory

Change-Id: I3fb9b1d7ecdf666fd8871987343c916a4a0f2a04
Signed-off-by: Sultanxda <sultanxda@gmail.com>
msm_fb: Port HTC MDP color enhancement feature

Ported from HTC One m7-kk-3.4.10-17db3b.

Signed-off-by: Sultanxda <sultanxda@gmail.com>

Conflicts:
	arch/arm/mach-msm/include/mach/board.h

Change-Id: I424ef1b8be48c4c8ab1d32d2fe441cf402e71d6a

Conflicts:
	arch/arm/mach-msm/include/mach/board.h
msm8x60_celox: Enable MDP gamma color enhancement

The gamma table in use is from the HTC One M7 panel driver. This makes colors less saturated.

Signed-off-by: Sultanxda <sultanxda@gmail.com>

Conflicts:
	arch/arm/mach-msm/board-msm8x60_celox.c

Change-Id: I623ac89861bccac3ff09e02c6ebdb7ac6331b631

Conflicts:
	arch/arm/mach-msm/board-msm8x60_celox.c
msm_fb: Port HTC MDP color enhancement feature

Ported from HTC One m7-kk-3.4.10-17db3b.

Signed-off-by: Sultanxda <sultanxda@gmail.com>
msm8x60_celox: Increase Ion camera heap size by 6MB

Fixes camera force closes. The MM heap could not be shrunk any further, so we lost RAM. Userspace now has 847MB of RAM.

Change-Id: I25aa73235e8062e4948f2c7c720d5af7b01c2897
Signed-off-by: Sultanxda <sultanxda@gmail.com>
sec_battery: Use AC charging for unknown cable types

Unknown cable types are charger type 6. This fixes the very annoying issue described in this thread: http://forum.xda-developers.com/showthread.php?t=1759541

Signed-off-by: Sultanxda <sultanxda@gmail.com>
drivers: power: Increase AC max current from 900mA to 1200mA+

Signed-off-by: Sultanxda <sultanxda@gmail.com>

Conflicts:
	drivers/power/smb328a_charger.c
drivers: power: Determine charge mode from actual cable type

CHG_MODE_UNKNOWN is now detected as CHG_MODE_AC, so remove it.

Signed-off-by: Sultanxda <sultanxda@gmail.com>
smb328a_charger: Remove CHG_MODE_UNKNOWN

CHG_MODE_UNKNOWN is detected as CHG_MODE_AC instead.

Signed-off-by: Sultanxda <sultanxda@gmail.com>
drivers: power: Enable 1200mA+ max charge current over USB

Signed-off-by: Sultanxda <sultanxda@gmail.com>
sec_battery: Allow high-speed charging over USB up until 95% battery

Previously, high-speed charging over USB would stop at 90%, at which point the charging current would be lowered to 500mA.

Signed-off-by: Sultanxda <sultanxda@gmail.com>
sec_battery: Remove vbus_present wakelock

The vbus_present wakelock prevents the phone from going into deep sleep when the charger is connected; however, after charging the device with a cable type 6 (unknown cable type) charger, the wakelock is not destroyed after the cable is disconnected and instead remains, draining battery. The Nexus 5 goes into deep sleep while charging, so it's safe to assume that the vbus_present wakelock is unnecessary and can be removed completely.

Signed-off-by: Sultanxda <sultanxda@gmail.com>
ld9040: add gamma control and color calibration controls

* Ported from piranha: https://github.com/CyanogenMod/android_kernel_samsung_piranha/commit/a56462e30650060e751569c153428c918d945d2f

Change-Id: I4ab59f2463084a39d6fa8070208bfb0b287248d8
ld9040: add additional checks and fixes

Change-Id: I9823f0e52735577e78b8a6c762666ccf110ecdad
Revert "bluetooth: Fix race conditions in BT LPM"

This reverts commit 26f7bce0c28a6f4a793e9775e38d6774ee0375ac.
Revert "bluetooth: Add low-power mode to support Bluedroid"

This reverts commit e75247713faf1c89d1ff72b53511f50ef596e7a6.
drivers: bluetooth: remove bluesleep_bcm

Change-Id: If67d0b5c71f4c44251e17bdb6cd6e3e33dea4273
mach-msm: Kconfig: Remove deprecated BT_MGMT config
tty: Import bcm_bt_lpm driver from sultan-kernel-pyramid-pure

Change-Id: Ica3bf1f1460c9a38b0e5faa35374808c14e21b7c
Signed-off-by: Sultanxda <sultanxda@gmail.com>