Bluetooth: Disable Sniff on HID ACL(s) if SCO is active

This patch disables sniff support on HID ACL(s) if SCO is active by
updating Link Policy settings. Once SCO is disabled, link policy is
again updated to re-enable Sniff on HID ACL(s). Without this patch
it was seen in presence of SCO, disconnection was observed on HID
ACL(s).

Change-Id: I81e0b3725bdadffe06ddb345afb9de2e042d5f9a
CRs-Fixed: 509616
Signed-off-by: Hemant Gupta <hemantg@codeaurora.org>
Bluetooth: Fix for the l2cap layer crashes while turning OFF BT

-This patch fix a case where while turning OFF BT l2cap channel
 & l2cap conn get deleted in one process context, which preempted
 the another process, where l2cap con was being used while trying to
 disconnect l2cap.  As the result l2cap conn pointer become invalid.
 Later which is leading a crash.  L2cap conn should be guarded by
 spin lock while disconnecting l2cap to avoid preemption which will
 avoid  crash due invalid conn pointer.

-This patch fix list_add crash due to invalid skb pointer.
 & BUG sleep warning as well.

CRs-Fixed: 499732, 504054

Change-Id: I90c5d29cc8728566a420f0dedaf7075846b32d1a
Signed-off-by: Nitin Shivpure <nshivpur@codeaurora.org>
Apexq: USB OTG

This is a requirement for proper host/otg function.

Copied from jf kernel. Enabled for Apexq only.

d2 probably wants this as well, but needs to consider
the implications of it on their own.

Added a bit more jf code to filter out the otg control
of charging and power supply via pm8921, which is not
relevant.

More jf code and now it actually works on apexq.
Probably require some massaging to make it work with d2.

--cleanup leftovers in the apexq board file.
--revert unintended change to apexq board file.
--hybridize with preexisting msm_otg.c from d2 kernel.
--should work for d2 as before without intervention.
--tighten up

Change-Id: If2f9a3b7cbb63a84db891af069a760945a4eebcc
expressatt: add support for panel color shifting based on a sysfs interface

Also update panel color offset application.

Based on following commits from d2 and apexq:
https://github.com/CyanogenMod/android_kernel_samsung_d2/commit/48ed09fe4187e14c8702ed52ac8e5f323784a41b
https://github.com/CyanogenMod/android_kernel_samsung_d2/commit/90459ce34ecd1c31591feddfea4b3a1d88ca314e
https://github.com/CyanogenMod/android_kernel_samsung_d2/commit/41db8f4436b2c55bf9fe1932136e8cae3b04821f

Change-Id: I491434ed4db79d4aa0b2fb9c9b8d8b248d9de898
sec_jack: do G plus L detection before setting micbias

- Only affects devices with CONFIG_SAMSUNG_JACK_GNDLDET set
- Taken from stock Samsung source

Change-Id: I2774925442c9734f51136f7acb98499ebb08fbb1
Merge "sec_jack: do G plus L detection before setting micbias" into cm-10.2
Merge "expressatt: add support for panel color shifting based on a sysfs interface" into cm-10.2
Apexq: Re-enable full AVS.

There is a problem with some devices that are detected
as having ACPU PVS: 3 not handling the fast tables properly.

To compensate, we are reducing them to the nom tables.

AVS error on sec_pvs=fafa phones always happens at 1512 MHz.
Disable AVS for that specific frequency.

We initially overlooked a rather massive voltage bump that
was being given to apexq devices with sec_pvs=fafa. All
such units are expected to run on the slow table, with an
additional boost of 50 mV.

Change-Id: If5341bf3f0b93d53349a373013f290adc2049e1c
Merge changes If5341bf3,If2f9a3b7 into cm-10.2

* changes:
  Apexq: Re-enable full AVS.
  Apexq: USB OTG
Merge changes I90c5d29c,I81e0b372 into cm-10.2

* changes:
  Bluetooth: Fix for the l2cap layer crashes while turning OFF BT
  Bluetooth: Disable Sniff on HID ACL(s) if SCO is active
apexqtmo: Update cpu clocking/power

With AVS, we need to make sure that voltages are properly
reset when bringing cores online/offline.

Change-Id: Id6411a3201ecf5cc5ab39c74e0a2da10d326ca0c
m2selinux_defconfig: now with valid values

Change-Id: Ic1bd3bfeb1db143958ba10ac673ea5d24a150033
Merge "apexqtmo: Update cpu clocking/power" into cm-10.2
Merge branch 'cm-10.2' of https://github.com/CyanogenMod/android_kernel_samsung_d2 into HEAD