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: fix charger current reporting error bq24157.

Somebody at samsung didn't read the documentation.
When the current limit was set for 950, it read out
as 900. When the current limit was set for 500, it
read out as 100. This charger does not permit any
fast charge current limit to be set for under 550 mA.

Change-Id: I98d5a302d17bfcb5a942f5a66752f34dcfff40fc
initial ExpressATT (SGH-I437) bring up

Change-Id: I803aef279e018646c438bb4c0f53c37df296febd

defconfig: update to full auto-generated config

- fix some wifi and battery related stuffs

Change-Id: Ifbd0cbbf2937dbd8b415441b6b78e3d4b165182a

board-express-battery: some build fixes

Change-Id: I456b5821764c840955451bbaabac50577b001e2a

mipi_samsung_oled: fix-up some panel defines

Change-Id: I1c2393e59de88e2f1b9f12830dbd46b0bedff963

defconfig: more updates for correct drivers

Change-Id: I507d476b69d19b169d42879838b550c401b05582

cypress-touchkey: include drivers from ExpressATT source drop

Change-Id: I495cb48556ddd539f14f4d6ec8f9a34df9bea411

board-express: fix build when using CONFIG_SAMSUNG_JACK_GNDLDET

Change-Id: I4a2ab16b9a2f886ab4f77953a824ebcfb30289e1

drivers: misc: fix compile of accelerometer driver

Change-Id: I1fad4c773c6fff122b94f83d30a56b3fe5c6942e

express: additional defconfig updates

Change-Id: I96b599c42fbfb075fe6bb48313662fb53475381b

board-express: pull in lots of changes from m2* devices

It boots now :D

Change-Id: I7e9f1bda02e15a91afaf46aa05f0afa7da5bb102

expressatt: include and compile mx7224s touchscreen driver

Change-Id: I515fb5c8f74bb9a68aabc0cec93d980138ca8e26

board-express: enable cypress_rev_check(), fixes touchkey init

Change-Id: I308fee0f3e2c544cb4a1b26c6ba2b792fe27d8d7

board-express: add missing code for kexec and ram console

Change-Id: If9f5b56ce9200b4efea007f05369109ac22188e9

board-8960-regulator: fixup MACH_EXPRESS defines and remove dupe code

Change-Id: I01e75d8aa9fe2427d2e8261c754c6dfe4aa88476

expressatt: enable CONFIG_MSM_PIL_MODEM

Change-Id: I4e5fcc7e422aa58035721a9870940e5acf6c3729

board-8960-pmic: ifdef for expressatt compatibility

Change-Id: I82b1f08f9b81b2c45d8a1cd5d0c457e7b5abfc37

board-8960-regulator: fix another MACH_EXPRESS ifdef

Change-Id: Ida0d41238934a6ecec9583d62c31a8f97a636b1b

board-express: update reserved memory allocation definitions

Change-Id: I8aa1b48f44afbcd7df6a24ccb246c9606582b81b

express: additional config updates

- remove unnecessary stuff, add gpio debugging, and fixes for video
  playback

Change-Id: I33548691cce7b37a2beff5cdf41c3a0cbfe6e627

board-express: general cleanup

Change-Id: I4126d0ccc358316fbc8758a5eed8ac4e6886ee6f

expressatt: remove unnecessary changes to sensor driver

Change-Id: I0456bd1fd08dfa53d371f3c27674d11024a34c3d

yas: fix accelerometer and magnetic sensors on expressatt

Change-Id: I848a7eeb6f169563a888d683dc2c9a28cadab953

expressatt: use our own board-pmic.c

Change-Id: Id76d044bbb01a6b1996ee7e6a12680b4c26700ce

msm_iommu: fix ifdefs for expressatt

Change-Id: Ifc2ef8343e0b4991a79503a1d6d0d59b3e2fea3e

expressatt: additional defconfig updates

Change-Id: I57cdb594832bc7dd806610ca1e458973d3fdb83b

expressatt: fix build for 4.3

expressatt: update defconfig to inherit from m2selinux defconfig

msm: remove unnecessary changes

expressatt: update defconfig

Change-Id: I803aef279e018646c438bb4c0f53c37df296febd
msm: usbaudio: Fix memory allocation for USB audio module init

Fix memory allocation issue in snd_usb_audio_init()
use sizeof(struct) insead of sizeof(pointer)

Change-Id: I270bbd7111e97dd4e0e92378f61d5025e16f5fca
Signed-off-by: Alex Fradkin <afradkin@codeaurora.org>
ASoC: usb: move the switch setting to more appropriate location

There is a delay between creation of sound card and creating of
corresponding steam. Currently we set the switch at the time of
creation of card. And later streams get created, so its more
optimal if we set the switch only after creating the stream.

Change-Id: Ic9f29d7a8dbcd32cde0097289ce6e1404a837372
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
Merge "initial ExpressATT (SGH-I437) bring up" into cm-10.2
board-expressatt: fix some usb/otg bugs

Change-Id: Id6292f2e369aabcf8c59909327f742dc5ea2b83e
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
Only enable vibrator sysfs for HAPTIC_PWM

Change-Id: Iddeb83bb57fa66641b964781ebe42172f35fde30
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