input: Disable DVFS and finger up/down logs

Change-Id: Ieb3bb8ec052cb6ddf8d5408a9b673ab46281b827
msm: pil: Add pil driver for video core

Add support to boot a securely signed image
on the video core.

Change-Id: I5e85ef23b34480b2598dcbe0b6b0a78626fcba72
Signed-off-by: Vinay Kalia <vkalia@codeaurora.org>
Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
msm: pil: Allow pil_put() to shutdown peripherals

Remove the temporary hack to prevent peripherals from shutting down
when pil_put() is called and the reference count goes to 0.

Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
(cherry picked from commit 39f90cbfbe87eb4195c0206f7db617723025fdb9)

Change-Id: Iaba64a03e3ae4793fa801c691a83a685b4c4d03c
Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
msm: smd: Do not use wakelock for local DEM notifications

Notify local SMSM callback clients without using a wakelock since SMSM
signaling is used by power management during power-down/-up sequencing
on DEM-based targets.  Grabbing a wakelock in this case will abort
power-down sequencing.

(cherry picked from commit da31d046ba0c5d3d1f674e9d35a39e9d0e4ae4df)

Change-Id: I1f7e3a3ae049573baaf8866efd79ad324a248f61
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
(cherry picked from commit 2240228f3be50b8a0ebd60d5f36cf6314f156404)
(cherry picked from commit 32c89ee88b9e1f020ba075d3688afb4d99033799)

Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
msm: smsm: Fix race condition in SMSM notification

The SMSM snapshot logic takes a snapshot of the current SMSM state,
places it into a FIFO, increments a wakelock count, and then signals a
worker to process the state changes.  The worker processes the state
changes and then decrements the wakelock count.

In the previous case, the code would do the following:

Interrupt handler:
 1) insert data into FIFO
 2) increment wakelock count

Worker:
 a) verifies >= 1 snapshots are in FIFO
 b) processes snapshot
 c) decrements wakelock reference count

If the interrupt handler is interrupted between steps 1 and 2, then the
function flow would be 1abc2.  In this case, step c would fail because
the wakelock count would be zero and the wakelock would remain at 1 and
locked even though the FIFO would be empty.  This results in the
wakelock not getting released.

To resolve this, the order of 2 (now 1') and 1 (now 2') was swapped
which always ensures 1' will always occur before abc which results in
the proper ordering 1'2'abc.

CRS-Fixed: 349099
Change-Id: I388b4c2f76838f59337e94f83b65fa06e81bb875
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
(cherry picked from commit 96b55f6ec25d5812a0492fc39b6b44a6141795d2)
(cherry picked from commit 8c17b69afa7f2b7eb10df635f984b15d08c71da5)

Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
msm: smd: Fix race condition while processing SMSM callback

When SMSM interrupt is received, a snapshot of SMSM callback is stored
in a kfifo. The snapshot is stored as
	a) SMSM state of each subsystem
	b) Wakelock usage information.

Then a work item is scheduled in global workqueue to process the snapshot
and notify the smsm clients. The smsm snapshot is processed as
	1) Lock the snapshot
	2) Retrieve SMSM states from kfifo and process them
	3) Unlock the snapshot
	4) Retrieve Wakelock usage information from kfifo

When back-to-back smsm interrupts are received, multiple work items are
scheduled in multiple cores. The first work item performs steps 1, 2 &
3 and got pre-empted. In the meanwhile the second work item starts
with Wakelock usage information and reports wrong smsm state to the SMSM
clients.

So schedule the work items in a single thread workqueue and interchange
steps 3 & 4 while processing the SMSM snapshot.

CRs-Fixed: 353552
Change-Id: Ic08e242653cc8d1648ad7a70bf7c5f6b7c089c4e
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
(cherry picked from commit 3249a223df201088289d113b80c70b9d23dea847)
(cherry picked from commit 492417630c5e4e42c09b7fe36c53dc9882a4ce4b)

Signed-off-by: Zhoulu Luo <zluo@codeaurora.org>
net: check return value for dst_alloc

return value of dst_alloc must be checked before use

Signed-off-by: Madalin Bucur <madalin.bucur@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
msm: bam_dmux: send powerdown ack to A2

When bam_dmux disconnects to the bam hardware in response to the A2
powering down, send an ack back to the A2 signaling that bam_dmux got
the powerdown signal and processed it.

This change optimizes the response time for back-to-back shutdown and
powerup sequences instead of requiring a hard coded delay in the A2 state
machine.

(cherry picked from commit 0b13a3522c4a68cb337398bb7bf66d3623d5f098)

Change-Id: I6e0d8036d189efba87873092562b8c5563c0db80
Signed-off-by: Jeffrey Hugo <jhugo@codeaurora.org>
(cherry picked from commit 4056da6cfa84c696b942771682e5bff2e6955ec0)
USB: gadget: Fix crash in ci13xxx_udc.c

In isr_setup_status_phase(), driver is not checking whether
the pointer is NULL before checking udc->status. Otherwise
it leads to crash. Fix it by checking for NULL.

CRs-Fixed: 367725
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
(cherry picked from commit 28f14eecbd924d067520943613dcd0f965e0310e)

Change-Id: I115844013d508cc48eb432317710960f47ba79ba
Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
(cherry picked from commit 66cd250e4368bf59ad4e9d1eb2e9868f98c01c88)

Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
d2: Enable the VIDC PIL driver

Change-Id: I93573a8818ed3a495f78fa091fe0a1c9575517f4
net: wireless: bcmdhd: Add SETSUSPENDMODE command

Change-Id: I0cb2e5d5f3e114fda84caa42b2eeb9f5197490f9
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>