ARM: dts: hammerhead: Change i2c clock rate to 19.2 MHz

* Referenced CAF:
  https://www.codeaurora.org/cgit/quic/la/kernel/msm/commit/arch/arm/boot/dts/msm8974.dtsi?h=kk_3.5&id=2762366bdeb1d2d3bb43ffb21ad3a0908d51551e

Change-Id: I5f6f93cc608c9b05b28dc56e423dd5c2008a2f67
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Sound Control: add line gain to cached and register lock

bump version to 3.6

Change-Id: I8f46535c0205b9dcb58ee5af2c5d456b0e4b0bd9
Signed-off-by: Paul Reioux <reioux@gmail.com>
Revebluesleep: Implemented to support bluedroid

"#define BT_BLUEDROID_SUPPORT 1" -> support BlueDroid
"#define BT_BLUEDROID_SUPPORT 0" -> support BlueZ

Since BlueDroid does not use kernel space HCI driver now, we add the
below 2 /proc nodes to make BlueDroid able to send HCI events to
bluesleep driver.

write 1 to /proc/bluetooth/sleep/lpm -> equivalent to HCI_DEV_REG event
write 0 to /proc/bluetooth/sleep/lpm -> equivalent to HCI_DEV_UNREG event
write 1 to /proc/bluetooth/sleep/btwrite -> equivalent to HCI_DEV_WRITE event

This basic implementation is from tegra kernel.

Change-Id: I2ded86ceb5b80d34d37f97f692b4d31acfb62057
Signed-off-by: Devin Kim <dojip.kim@lge.com>
signed-off-by: hyungjung0521.kim <hyungjung0521.kim@lge.com>
bluesleep: Support for device tree

Bluesleep driver is able to get the board specific configrations from
device tree.

Change-Id: If9ede425c5a7134511e4fbbc82edf440015bdcc1
Signed-off-by: Devin Kim <dojip.kim@lge.com>
Signed-off-by: hyungjung0521.kim <hyungjung0521.kim@lge.com>
bluesleep: Change the polarity for IO and UART ID

BT wake is active low and Qualcomm UART 99 is used for BT

Change-Id: If2a5b5cbffe7b8a3d1659150ed96142758ea037a
Signed-off-by: Devin Kim <dojip.kim@lge.com>
Signed-off-by: hyungjung0521.kim <hyungjung0521.kim@lge.com>
bluesleep: Set the file permission for /proc/bluetooth/sleep/*

Set the writable permission only for user and group

Change-Id: I47f3784cf80369816168c3d6846ecee6b99aef73
Signed-off-by: Devin Kim@lge.com <dojip.kim@lge.com>
Signed-off-by: hyungjung0521.kim <hyungjung0521.kim@lge.com>
bluesleep: unlock spin before controlling the hsuart power

Kernel might be in sleep to wait for rpm communication when it
controls the hsuart power. So should unlock the spinlock before
controlling the hsuart power.

Change-Id: I7248bc35645666c86c924bba0d47262c911cd8ae
Signed-off-by: Devin Kim <dojip.kim@lge.com>
Signed-off-by: hyungjung0521.kim <hyungjung0521.kim@lge.com>
bluesleep: Add debugmask to print the debug messages out

enum {
       DEBUG_USER_STATE = 1U << 0,
       DEBUG_SUSPEND = 1U << 1,
       DEBUG_BTWAKE = 1U << 2,
       DEBUG_VERBOSE = 1U << 3,
};

eg. if you wanto to see the messages for both suspend and btwake, set like below
echo 6 > /sys/module/msm_bt_sleep/parameters/debug_mask

Change-Id: I37237bfafa1d04d9e8d3ad50c3a7c0a445785aeb
Signed-off-by: Devin Kim <dojip.kim@lge.com>
bluesleep: Fix the bt wake flag mismatch

BT_EXT_WAKE and BT flag should be same. Set the BT WAKE to WAKE and
also set the flag as WAKE.

Change-Id: Iff3f4f13eddbbde1f13f41954742be5ca0df57aa
Signed-off-by: Devin Kim <dojip.kim@lge.com> (reverted from commit 56776d226af88706cca5a807d461103a8bcd4888)
msm-sleeper: use ex_max_freq

Change-Id: I58791dde21df515b68969687e90737c451b2e903
msm: thermal: Update thermal subsystem

This is a squash of the following commits:

4bc738d2 msm: thermal: Set vdd restriction initialize level to -1
5daeff0f msm: thermal: Clean up msm cpufreq function calls
6b21cae8 thermal: tsens: Fix invalid set temperature check
c473c9dd Revert "msm: thermal: Clean up msm cpufreq function calls"
bb646211 thermal: Add sensor API to allow any driver to set thresholds
718bf641 thermal: msm: tsens: Notify thermal framework on threshold cross
4ff40944 msm: thermal: Enable hotplug support in kernel
3af26db0 thermal: Fix sensor thresholds not accounted correctly
d8b1e1ec Revert "Revert "msm: thermal: Clean up msm cpufreq function calls""
b2f16712 thermal: Add Support for enabling and disabling tsens trip
81c1b0b7 msm: thermal: Don't initialize hotplug thread when not configured
89961312 msm: thermal: Add support for emergency frequency mitigation
6460392a msm: thermal: Add IOCTL interface support to Kernel Thermal Monitor

Bug: 14139855

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

Conflicts:
	drivers/thermal/msm_thermal.c
Signed-off-by: Naveen Ramaraj <nramaraj@codeaurora.org>

Conflicts:
	drivers/thermal/Makefile

Change-Id: Iffe91d3d4c95ed9fc82c3d2cc55c6cf403a65ed2
intelli_thermal: compatibility fix up with latest MSM Thermal drivers

Change-Id: I22a6d8d9e5635779d4c5d53606c858583260647e
Signed-off-by: Paul Reioux <reioux@gmail.com>
intelli-thermal v2: initial adaptation

Intellithermal 2.0 is based on the latest Qualcomm thermal driver adapted for
in-kernel use and control.  Newer MSM8974+ chipsets should use this driver
going forward

Change-Id: Ic481e9134f0a8831a748f45a2517d5d1f5f2b191
Signed-off-by: Paul Reioux <reioux@gmail.com>
defconfig: enable intelli_thermal

Change-Id: I2fef4d7c7c205fe44827d43a2b45876dca159939