Added Linaro 4.8.2 Fixes
mach-msm: board-mako-display.c: revert c1be92b796 partly - banding fix wasn't reverted, the yellow and green reinforce and blue subdue is reverted.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
gamma_control: add extensive control over the display gamma curve.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>

Conflicts:
	drivers/misc/Kconfig
	drivers/misc/Makefile

Conflicts:
	drivers/misc/Makefile

Conflicts:
	drivers/misc/Makefile
gamma_control: fix permissions for userspace apps.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
gamma_control: change to stock values.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Change default gamma to bundi's iPhone5
Userspace Voltage Control (thanks faux123)

-Changed CONFIG name to my liking
-Fixed spelling in the Kconfig
Lower minimum voltage
After lowering, make it possible to set
acpuclock: Set 192mhz min freq, also deactivate some unused Frequencies like in my 4.2.2 Kernel.
mako: display: fix RGB values to be reset each screen on/off.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Userspace Voltage Control: tweak faux123's original work

Only get/set frequencies that are configured to be used as scaling
frequencies.

Originally committed by _motley (https://github.com/thracemerin/kernel-Nexus4/commit/116b76f36c61adbac4db8c331e23b967c38389b6)
Sound Control: Sound control for WCD93xx codec
Fully GPL'ed version.
Sound Control: Added headphone poweramp controls

bump version to 2.1 to reflec this new addition

Signed-off-by: Paul Reioux <reioux@gmail.com>
freezer: shorten freezer sleep time using exponential backoff

Date	Wed, 1 May 2013 18:34:59 -0700

All tasks can easily be frozen in under 10 ms, switch to using
an initial 1 ms sleep followed by exponential backoff until
8 ms.  Also convert the printed time to ms instead of centiseconds.

Signed-off-by: Colin Cross <ccross@android.com>
modified for Mako hybrid from LKML

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

Conflicts:
	kernel/power/process.c
freezer: add new freezable helpers using freezer_do_not_count()

Date	Wed, 1 May 2013 18:35:01 -0700

Freezing tasks will wake up almost every userspace task from
where it is blocking and force it to run until it hits a
call to try_to_sleep(), generally on the exit path from the syscall
it is blocking in.  On resume each task will run again, usually
restarting the syscall and running until it hits the same
blocking call as it was originally blocked in.

To allow tasks to avoid running on every suspend/resume cycle,
this patch adds additional freezable wrappers around blocking calls
that call freezer_do_not_count().  Combined with the previous patch,
these tasks will not run during suspend or resume unless they wake
up for another reason, in which case they will run until they hit
the try_to_freeze() in freezer_count(), and then continue processing
the wakeup after tasks are thawed.  This patch also converts the
existing wait_event_freezable* wrappers to use freezer_do_not_count().

Additional patches will convert the most common locations that
userspace blocks in to use freezable helpers.

Signed-off-by: Colin Cross <ccross@android.com>

Conflicts:
	include/linux/freezer.h
futex: use freezable blocking call

Date	Wed, 1 May 2013 18:35:05 -0700

Avoid waking up every thread sleeping in a futex_wait call during
suspend and resume by calling a freezable blocking call.  Previous
patches modified the freezer to avoid sending wakeups to threads
that are blocked in freezable blocking calls.

This call was selected to be converted to a freezable call because
it doesn't hold any locks or release any resources when interrupted
that might be needed by another freezing task or a kernel driver
during suspend, and is a common site where idle userspace tasks are
blocked.

Signed-off-by: Colin Cross <ccross@android.com>

Conflicts:
	kernel/futex.c
USB force fast charging

-Use base from Chad Froebel <chadfroebel@gmail.com> so we continue to
use the same generic sysfs mechanism

-Referenced franco's git for drivers/usb/otg/msm_otg.c changes
https://github.com/franciscofranco/mako/commit/5a8a4c8e23c7e1df39c740b9ce1d5dda20b0ede3

Off by default

Turn on:
echo 1 > /sys/kernel/fast_charge/force_fast_charge

Turn off:
echo 0 > /sys/kernel/fast_charge/force_fast_charge

Signed-off-by: Paul Reioux <reioux@gmail.com>
lib/memcopy: use glibc version

the kernel's memcpy and memmove is very inefficient. But the glibc version is
quite fast, in some cases it is 10 times faster than the kernel version. So I
introduce some memory copy macros and functions of the glibc to improve the
kernel version's performance.

The strategy of the memory functions is:
1. Copy bytes until the destination pointer is aligned.
2. Copy words in unrolled loops.  If the source and destination are not
   aligned in the same way, use word memory operations, but shift and merge
   two read words before writing.
3. Copy the few remaining bytes.

Signed-off-by: Miao Xie <miaox*******>
Signed-off-by: faux123 <reioux@gmail.com>
lib/string: use glibc version

the performance of memcpy and memmove of the general version is very
inefficient, this patch improved them.

Signed-off-by: Miao Xie <miaox*******>
Signed-off-by: faux123 <reioux@gmail.com>