Squashed revert of panel color shifting sysfs interface

Squashed revert for the whole d2 family in preparation for
gamma control shifting.

This reverts commits 62eda51c6195cd0b08d7a4d34d29f7be077f9bf6,
                     41db8f4436b2c55bf9fe1932136e8cae3b04821f,
                     90459ce34ecd1c31591feddfea4b3a1d88ca314e,
                     d97dcfbaf1656c4fcc1e1d0b8a694e8edaba5b6c.

Change-Id: I242cd87025c7075ff36c03632e8fbad33ac8b230
Add Gamma Control v1

Import gamma_control.c at 5647088 from
https://bitbucket.org/morfic/trinity_four

Change-Id: I33dc38b9148c856cc2d27e8a1b1829609b31646b
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
Signed-off-by: morfic <morfic@gmail.com>
GammaControl: Rework for the d2 family

Rework to gamma control to go along with our panels, bump version
& add make parts.

RGB gamma curve can be shifted by modifying files in:
"/sys/class/misc/gamma_control"

Each gamma value requires 3 values for shifting (red, green, & blue),
i.e:
  echo "25 6 -10" > /sys/class/misc/gamma_control/v255rgb

Includes changes to color offset application from d97dcfb & 90459ce

Change-Id: I81d6ff7bfd261d9c52491da157a4e696168dc8f8
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
GammaControl: create a single tunable knob using previous presets

Change-Id: I49a7f5d009f9a8f51b4a73fae65ba07cdc14b38f
Merge changes I49a7f5d0,I81d6ff7b,I33dc38b9,I242cd870 into cm-11.0

* changes:
  GammaControl: create a single tunable knob using previous presets
  GammaControl: Rework for the d2 family
  Add Gamma Control v1
  Squashed revert of panel color shifting sysfs interface
motor: tspdrv: Check buffer size before copying

Update from VPUDND8

Change-Id: If7a57f15151074b1d984b51255257116121e5682
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
motor: tspdrv: return on invalid buffer index

Update from VPUDND8

Change-Id: I941042c68d89ed636d8be9f2f54bcc1c20f930a8
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
mm: fix anon vma naming

Fix two bugs caused by merging anon vma_naming, a typo in
mempolicy.c and a bad merge in sys.c.

Change-Id: Ia4ced447d50573e68195e95ea2f2b4d9456b8a90
Signed-off-by: Colin Cross <ccross@android.com>
GammaControl: Fix tuner being set

Set the whole color_mods array.

Also, fix expressatt; FB_MSM_MIPI_MAGNA_OLED_VIDEO_WVGA_PT uses
smart mtp ea8868, which supports the gamma voltages V59..V15

Change-Id: I5a5500c9b1cea5415a29c2a7909147e8f9d03ed9
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
dhd: apply old changes to updated driver

- Condense wakelock handling
- Remove oodles of debuggery
- Assorted small changes

Change-Id: I241492557614e7c20e809edd7f0646aafe388216
m2: increase volume key debounce to 8

To better differentiate long-press and short press

Change-Id: Ib2470790a95baba2b1e31baefdbd4bc5fbb0ef91
GammaControl: Color mods fixup

Re-order & tweak so that the table goes with the sliders in display
settings. We'll lose support for trinity colors on-the-fly, but that
can be easily redone by increasing the 'blue' slider in userspace
and modifying v1rgb
  echo "-9 -8 -5" > /sys/class/misc/gammacontrol/v1rgb
  (double the value for more blue)

Change-Id: I484a435b550d630968647add4013f04e2fb0eeb8
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
mipi_samsung_oled: Set gammas without need for a screen reset

Split from df3f71a & dc5e59e of https://github.com/DecimalMan/dkp
[ljc: Rework with shipped APIs]

Change-Id: I021f810d4c413ebff6660ae0dda70b31ea97be00
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
oled: d2, etc: Clean up some logspam

when utilizing userspace controls

Change-Id: I1589728d6012afafca53fb549cc032157d126af6
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
Merge changes I1589728d,I021f810d,I484a435b,I5a5500c9 into cm-11.0

* changes:
  oled: d2, etc: Clean up some logspam
  mipi_samsung_oled: Set gammas without need for a screen reset
  GammaControl: Color mods fixup
  GammaControl: Fix tuner being set
Gammacontrol: Lucky number 13

Let's ditch the table

Change-Id: I4f208fda16889965fecab76d90de11d32db7f54d
Merge branch 'cm-11.0' into kk_mkt