Revert "mmc: msm_sdcc: Revert to the older clock-APIs"

This reverts commit 9a3500a6c96a3ceda1b77f268aae12c100723bab.
Revert "mmc: msm_sdcc: Fix deadlock while resuming sdcc from userspace"

This reverts commit 8f62fd525df9cfa4e61135a8541a33303e7a3a6b.
Revert "The error checking is not performed when the clocks are enabled."

This reverts commit ab2adda95e056c4e35c9e3afbcbf4751f8f129ed.
video: msm_fb: Increase display timeout to 2 seconds

One second time out for no frame update, as in current implementation,
does not allow CABL to reach minimum backlight level possible because
histograms dont get generated after one second. So increase time out
period to two seconds which seem to be sufficient for complete black to
complete white and vice versa transitions.

CRs-fixed: 370804
Signed-off-by: Pravin Tamkhane <pravint@codeaurora.org>
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
(cherry picked from commit 1bb4edf9242b0397975636a4442318713a53b5e6)

Change-Id: I298dbc94c32035bc7872341a028af979d74fe38f
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
Revert "msm_fb: Increase backlight granularity from 15 to 255 levels"

This reverts commit 0ec9060e48d3287db2893d179a4ef2067bedccef.

Change-Id: Id362f91cf8d77be97ffc8f97477e84e00e13cf0c
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
Revert "msm_fb: Increase PWM granularity to 255 levels for 8960 fluid"

This reverts commit 0bf99ac9a95d97410252fb7c6de91cd932622acc.

Change-Id: I3f180fe4877626a0864c5275aefe80ecc4b1cf15
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm: devices-msm7x27a: Add panic notifier for 7627a/8625

When panic occurs we want to flush the inner and outer
caches.

Change-Id: I9cb0e4e93a348be508de63363b6761457f1de249
Signed-off-by: Vikas Reddy Pachika <vpachi@codeaurora.org>
bluetooth: Check for hcon during during sock_close

It is possible that during BT OFF operation the hcon
could be released from a tasklet context while we are
trying to send the l2cap disconnect req. Make sure
that hcon is valid before dereferencing it during
l2cap disconnect req.

CRs-fixed: 383345
Signed-off-by: Sunny Kapdi <sunnyk@codeaurora.org>
(cherry picked from commit 059f5ba91071172970d8db0a1a954c57c23e53d8)

Change-Id: Ifa61bf4f3cbe7e62df47adf05e4e4472667d2993
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>

Conflicts:
	net/bluetooth/l2cap_core.c
msm: board-8930: Update the PM8038 MPP init data

PM8038 MPP3 is not used for USB or HDMI control.
Therefore, remove the erroneous MPP initialization.

CRs-fixed: 376505
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
(cherry picked from commit cee3d06b09e1367030c621cdaca553901d41afe8)

Change-Id: Id0883eb1147577256a50a0a95cc0b68da8bd5d62
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm: kgsl: Do bounds checking on user supplied GPU addresses

Add bounds checking to kgsl_sharedmem_find_region to ensure that GPU
addresses supplied by the user via KGSL_IOCTL_SHAREMEM_FREE and
KGSL_IOCTL_CFF_SYNCMEM are within a valid range for the MMU scheme of
choice.

CRs-Fixed: 380296
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
(cherry picked from commit e22e21d93260cee3aff0dff7247635d9624c8aa5)

Change-Id: Ic0dedbad2d55d1029ff512bc4e7bf3acd1e67841
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
ASoC: msm: update BTSCO rate put function.

The value for the amix command with the numeric strings is
the actual value not the order of the string in the array
of text so the put function has to be updated to handle it.
For example,  the following amix comand:
amix 'Internal BTSCO SampleRatee' 16000'
The value passed from the alsa-lib is not 2, i.e., the 2nd
paramater in the command string:
static const char *btsco_rate_text[] = {"8000", "16000"};
Instead, it is 16000.

CRs-fixed: 364832

Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
(cherry picked from commit fd8e0b303ba46207f24a3738f8859e84044833fd)

Conflicts:

	sound/soc/msm/mdm9615.c
	sound/soc/msm/msm8930.c
	sound/soc/msm/msm8960.c

Change-Id: I58156f13bec3e4a297d0d4cecc1bf26fb7c7c040
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
msm_fb: display: no early suspend for writeback panel

Writeback panel is not real physical panel and no power consumption
concern, so it is removed from early suspend registration to avoid
open fb2 error during suspend/resume.

CRs-fixed: 371137
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
(cherry picked from commit efb6c143ea951dab6dc72586100999d5b94c1c8d)

Conflicts:

	drivers/video/msm/msm_fb.c

Change-Id: I004cd5f80bf200bb29b992b0fd445e3b7d2f1e35
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
power: pm8921-bms: fix ccadc accuracy

The bms ccadc counters are incremented/decremented every 56 ticks of the
sleep clock not 55. Correct the tick count.

Also sleep clock is derived by dividing the 19.2Mhz clock by 586. Hence
the HZ count of the sleep clock should be 32764 instead of 32768. Fix
this too.

Crs-fixed: 381923
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
(cherry picked from commit b787b29843f63fcb75700cad8e69afcdd5d7da36)

Change-Id: Iac3a21f7a9ac7a544e4fc7ff0d48aca35d896630
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
FMEM: Disable FMEM

Turn off deprecated FMEM.

CRs-fixed: 385962
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
(cherry picked from commit 60ceaa1e2dbe6226183b58387c401104df8f4b5d)

Conflicts:

	arch/arm/mach-msm/board-8064.c
	arch/arm/mach-msm/board-8930.c

Change-Id: I4b0c7a24311e360d9540bd6fe9c7931996f4485b
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>
bluetooth: Add support for LE conn param

Added support to let the userspace know about the updated
LE connection parameters. On receiving successful connection
complete and connection parameters update event from the BT
Controller, send a mgmt event to the userspace bluetoothd.

CRs-fixed: 380271
Signed-off-by: Sunny Kapdi <sunnyk@codeaurora.org>
(cherry picked from commit a42b50244cdb71f93bf842a28b0fc1cecc622c55)

Change-Id: I47594d79bfd6e6774bb060fdb12a019795376a2f
Signed-off-by: Ramakrishna Prasad N <crpn@codeaurora.org>

Conflicts:
	include/net/bluetooth/hci.h
	include/net/bluetooth/hci_core.h
	include/net/bluetooth/mgmt.h
	net/bluetooth/hci_event.c
msm: kgsl: Increase REG_RBBM_CNTL value to 0xFFFF for A200

Increase number of clocks that RBBM will wait before de-asserting
the Register Clock Active signal. This fixes kernel panics during
stability tests on multiple devices

Change-Id: I50ad69f28b50444e88239c2332bd5756db1ae089
CRs-fixed: 372793
Signed-off-by: Rammohan Basavaraju <rammoh@codeaurora.org>

Conflicts:
	drivers/gpu/msm/adreno.c
Bluetooth: Avoid putting LE Conn into sniff/active

LE connections don't have sniff/active connection
mode, unlike BR/EDR. Make sure that the link which
has been requested to enter sniff/active mode is not
an LE connection.

CRs-fixed: 376972
Signed-off-by: Sunny Kapdi <sunnyk@codeaurora.org>
(cherry picked from commit 39eaba3542ab177a997762e81963392260f904ca)

Change-Id: Ib25944556e99f7e648a39548be8ca08d7cbd632f
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm: ipc: Fix race condition between route & close_port operations

QMI Client is closing the interface port with IPC Router, while the
IPC Router is handling an incoming QMI message from modem for that
client. There is a race condition between these two operations. This in
turn leads to IPC Router trying to lock the wakelock which has been
destroyed as part of close operation. IPC Router gains exclusive
access to the interface port information, so that close operation
does not happen in parallel to the route operation.

CRs-Fixed: 367561
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
(cherry picked from commit be9954bc046aa9238f17fd2d420973a273906b81)

Change-Id: Ieff91b8959003a4d19e7c8d6a6aa2f1b39698990
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
msm: ipc: Update the work item in the read path

IPC Message Router schedules a work item to read incoming messages
from the remote subsystems. Once a message is read, the work item
queues itself again in the workqueue. The queued work item performs
an uninterruptible wait for further messages. This causes the "loadavg"
to be consistently greater than 1. So refactor the read path such that
the read work item is queued only after the message has arrived.

CRs-Fixed: 383657
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
(cherry picked from commit 872ecd84746547eb5d82c04080439b46fc2426d7)

Change-Id: If91e8738bad8b33f91af55ec69795693e20b3d3e
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>
Revert "Revert "msm_fb: Increase PWM granularity to 255 levels for 8960 fluid""

This reverts commit 988cf899932688b4e7b97b2b21931670e37e2afc.

Change-Id: Id56ea30890361e0f95fa65d3fd26230d4684ec80
Signed-off-by: Srivalli Oguri <oguri@codeaurora.org>