LG: Updated support for the GK (1K G-project, the "G Pro")

Includes some minor MSM updates that were part of the E986
drop, gcc 4.7 fixes, and a defconfig for the e986
gk: pmic: Enable RTC writes
gk: isolate msm-specific ion extensions

This is another step in the process of isolating msm-specific ion
features from stock ion.

Change-Id: Ic2979d6f822bcfc9b61eec3e889a8ebe605d4a45
gk: fix ion_platform_data definition

fix ion_platform_heap to make is use an usual way in board configuration file.

Change-Id: I8686108a9fe0aa2ba9f9c84990d555f947f78f86
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
[lauraa: Fixup msm board files]
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
gk: ASoC: msm: Load ADSP image during bootup

On 8064, ADSP image is loaded when pcm_open is
called for the first time. This caused the first
audio playback to be delayed. To fix this, adsp_loader
is modified to load ADSP firmware using pil.

Bug: 8204207

Signed-off-by: Alexy Joseph <alexyj@codeaurora.org>
Signed-off-by: Mekala Natarajan <mekalan@codeaurora.org>
Signed-off-by: Vineeta Srivastava <vsrivastava@google.com>
msm_fb: display: get mdp bandwidth parameters from board file

Underrun issues can be solved by changing mdp bandwidth parameters:
max_bw, ab_factor and ib_factor. However these parameters are not
universally same for all targets, and one set of values that works for
one target could cause underruns or higher power on other
targets. This change is driver change which makes those parameters
target dependent.

CRs-Fixed: 464492
Change-Id: Ib23ebc431caabbe91c7ae3bd96bb38789d7ddc90
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
msm: display: provide mdp bandwidth parameters from board file

Underrun issues can be solved by changing mdp bandwidth parameters:
max_bw, ab_factor and ib_factor. However these parameters are not
universally same for all targets, and one set of values that works for
one target could cause underruns or higher power on other
targets. This is board side change.

CRs-Fixed: 464492
Change-Id: I2a8fbb9018011ddf42dfa50b371e450e38f4351a
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
gk: msm: display: provide mdp bandwidth parameters from board file

Apply change I2a8fbb9018011ddf42dfa50b371e450e38f4351a to the
g-proj.
Raise mdp bandwidth factors for the GK's panel, and set the defaults
for the j1 (same as the fallback values, which appear to cause
no issues and look the same as default 8064).
msm: mdp: Disable early suspend only for the MDP driver

Early suspend is deprecated in the framework but disabling it
completely can affect other subsystems. Disabling only for the
MDP driver.

Signed-off-by: Naseer Ahmed <naseer@codeaurora.org>
gk: Fix unbalanced disables for vibrator

[ 3101.348816] amp_enable: AMP_EN is set to 1
[ 3102.875995] ------------[ cut here ]------------
[ 3102.879749] WARNING: at android/kernel/drivers/regulator/core.c:1590 _reg
[ 3102.879779] unbalanced disables for 8921_l16
[ 3102.879779] Modules linked in:
[ 3102.879810] [<c0014380>] (unwind_backtrace+0x0/0x11c) from [<c007159c>] (
[ 3102.879810] [<c007159c>] (warn_slowpath_common+0x4c/0x64) from [<c0071634
[ 3102.879840] [<c0071634>] (warn_slowpath_fmt+0x2c/0x3c) from [<c02c5010>]
[ 3102.879871] [<c02c5010>] (_regulator_disable+0x30/0x23c) from [<c02c523c>
[ 3102.879871] [<c02c523c>] (regulator_disable+0x20/0x58) from [<c005bdcc>]
[ 3102.879901] [<c005bdcc>] (vibrator_power_set+0xfc/0x150) from [<c033fcb4>
[ 3102.879932] [<c033fcb4>] (android_vibrator_force_set+0x88/0x11c) from [<c

Change-Id: I54987c842384bd23b5daecddd6440d0ad0857523
gk: vibrator: add XO clock control for vibrator

Change-Id: I0c40c22bb160a4d0c818778471f33f99352129e2
gk: vibrator: fix unbalanced calling of regulator

Vibrator uses hrtimer and workqueue concurrently for vibrator on/off.  It
sometimes causes the unbalanced calling of regulator. So use mutex to avoid the
unbalanced calling.

Change-Id: I937c331703c0db028abe88967c8256cd56d6f5a5
Signed-off-by: Iliyan Malchev <malchev@google.com>
gk: vibrator: adjust vibrator amp

You can set the value of amp from 0 to 100.
If you want to vibrate inversely, you can set from 0 to -100.

Change-Id: Icdb392d1601aa61f41a9f22e3c070a86723bacfd
gk: vibrator: clean up codes

remove unnessary codes and clean up.

Change-Id: I10d281f6cb1f7dc6cad2cac34bd276875cc50c0c
gk: vibrator: fix the unbalanced voting XO on/off and set gpiomux

It caused increasing the rock bottom current. If XO on is called twice and
XO off is called once, in that case XO clock couldn't be off. So voting
XO should be balanced.

And set the pwm mode when enabling vibtatior. In other case, set the gpio
mode. It prevents the current leakage by PWM. This is controlled by
gpio_requeset and gpio_free.

b/7242206

Change-Id: I8a6ce9b9beb9f981fb7e2db8c6510fa14478b13f
gk: clean up board-mako-misc codes

- use pr_xxx instead of custom macros
- handle the erros

Change-Id: Ibb2ad7fda62a0fe5838cd1cd5124de8536e9403f
kcal_qlut: remove the lower boundaries on GK
Merge branch 'gk-10.2' into cm-10.2