Merge "Perf: Add generic IRQ handlers for ARMv7 PMU's"
Merge "Perf: Let platforms decide IRQ request methods."
Conflicts:
	arch/arm/kernel/perf_event.c
	arch/arm/mach-msm/pmu.c
Merge "msm: Perf: Differentiate between L1 and L2 PMU IRQs"
Merge "Perf: Assign proper routine to free IRQ"
Merge "msm: perf: add debug patch logging framework"
Conflicts:
	arch/arm/mach-msm/perf_debug.c
Merge "Perf: Restore counter after powercollapse for generic ARM PMU's"
Merge "Perf: Toggle PMU IRQ when CPU's are hotplugged"
Conflicts:
	arch/arm/kernel/perf_event.c
Merge "Perf: Correct irq for CPU hotplug detection"
USB: mdm_bridge: Simplify data bridge suspend/resume path

Synchronous runtime PM API is used to increment the PM usage counter
in Tx path.  It means Tx data path will not race with interface suspend.
Remove "delayed" anchor which is meant for Tx requests, that are arrived
during suspend.  There is no point in distinguishing auto suspend and
system wide suspend.  Abort suspend when we have pending Tx URBs.

CRs-Fixed: 451414
Change-Id: I302b120ccecfe30db1ebd2b1fcd9945a3675cf83
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
USB: mdm_bridge: Fix control bridge suspend

The current code does not abort suspend when there are pending URBs.
They are simply killed during suspend. This may lead to QMI stall.
Add proper checks to ensure that there is no pending Tx/Rx data
during suspend.  Clear the "SUSPENDED" flag in resume only after
taking out all the URBs from "tx_deferred" anchor.

CRs-Fixed: 451414
Change-Id: Icc48afc5eeedcc126d0ab1bec951bde4a53ac165
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
USB: Rate limit adb open and release messages

The print messages are helpful in debugging adb stability issues.
However they get flooded if adb daemon is restarted continuously.
If serial console is enabled this is leading to watchdog bark.

CRs-Fixed: 456662
Change-Id: I1381d44b7a5081ee04053c739b9c83111b191125
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
USB: android: Rate limit android enable warning

An error message is printed when user space tries to enable/disable
android configuration when it is already enabled/disabled.  This
message is helpful in debugging USB composition issues.  However
this message is getting flooded in an error condition.  If serial
console is enabled, it is leading to watchdog bark.

CRs-Fixed: 457725
Change-Id: I2d61ac46ba3c8464bada23a64ad0d8027a4adfe9
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
arm: common: move cpaccess sysfs node

cpaccess uses sysdev which is being deprecated.
Move the cpaccess node out of the /sys/devices/system
directory to /sys/devices. Temporarily leave the original
sysdev node for migration purposes, until userspace
applications can be moved to the new node.

Change-Id: Iacc776968f892fc6c6463764e576d987e4371716
Signed-off-by: Neil Leeder <nleeder@codeaurora.org>
msm: display: Add DSI clock control for MDP GDHS power collapse

Enable DSI clock and regulator before enabling/disabling power collapse
for MDP GDHS.

(cherry picked from commit ad3200279e62eff01fd1bb9136cc9c0d11e10380)

(cherry picked from commit 58c5992c710df379e26bb210e00c74da501db9d2)

Change-Id: I76b91260c61abf214e688c0dea6989ed2cfa3801
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>

Conflicts:

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

Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/board-8064-regulator.c
	drivers/video/msm/mdp.c
Merge "msm: camera: Update debug data in vfe driver"
ASoC: wcd9310: Reset OTHR_RESET_CTR before power down

There is a missing step to clear OTHR_RESET_CTR before power down.
It could cause a glitch and power hit without it. It has to be reset.

original gerrit is https://review-android.quicinc.com/#/c/191312/
This is cherry-pick gerrit by developer to jb_2.5

Change-Id: Id96070352480be6ea412844d4f71765e2df76afe
CRs-fixed: 420142
Signed-off-by: Fred Oh <fred@codeaurora.org>
msm: ipc: Fix the logic while dumping IPC Router routing table info

IPC Router Routing table is organized as a hash table. The routing
table information is dumped based on the index into that hash table.
Update the logic to dump the routing table information based on the
subsystem's node id.

Change-Id: Ideaf24934b93349e2f2cf1d695d08841c04aa5f9
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
msm: ipc: Update HELLO message processing

When IPC Router receives a HELLO message from a remote IPC Router, the
protocol is to send a list of servers registered locally and registered
outside the mesh network where the HELLO message is received. Currently
the implementation does not follow this protocol strictly and hence
correct the implementation.

CRs-Fixed: 414147
Change-Id: I75aa089b152baea0925d127b1d9deb6684677cfa
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
msm: ipc: Reorganize server hash table

QMI server(<service_id:instance_id>) info is maintained using a hash
table. The server's instance_id is used as the key to index into that
hash table to perform maintenance operations(add, lookup, delete).
The service_id values are well distributed than the instance_id values
and hence the operations on the hash table are not optimized. Optimize
the hash table operations by using server's service_id as the key to
index into the hash table.

While accessing the server hash table, the mutexes are locked and
unlocked inside the access functions. This introduces some race
conditions once the access functions return. So lock and unlock the
server hash table mutex outside the access functions.

CRs-Fixed: 415158
Change-Id: Id1ce6bbfc677df26ff209fd62dca8553c7d2b4a5
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
msm: ipc: Fix lockdep warning by IPC message router

IPC Message Router while processing the HELLO message, sends a server list
information registered locally to the remote subsystem which has sent the
HELLO message. IPC Message Router does this operation by locking mutexes
in the following order:
1) routing_table_lock
2) server_list_lock inside msm_ipc_router_send_server_list

IPC Message Router while processing the NEW_SERVER message, accesses the
server list information to check if the server information advertised by
the remote subsystem is already known before adding that information to
the server list. IPC Message Router does this operation by locking mutexes
in the following order:
1) server_list_lock
2) routing_table_lock inside msm_ipc_router_lookup_remote_port

This leads to a deadlock if the IPC message router processes HELLO message
from one subsystem and NEW_SERVER message from another subsystem. Fix this
out of order locking scenario by locking the server_list_lock before
accessing the msm_ipc_router_send_server_list function.

CRs-Fixed: 417155
Change-Id: Ie38c1c21dccefac7a9b36ad107b13feccd986ed2
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>