ASoC: Change Ear PA disable sequence

Current code disables Ear PA clock before Ear PA is
disabled completely. This produces a tick noise when
a voice call is disconnected. The changes disables the
Ear PA clock after the Ear PA is disabled completely.

CRs-Fixed: 629477
Change-Id: Id8f0f36dbe56b752da40f4b7f571a905f6292241
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
usb: ci13xxx_udc: Do not clear ENDPTSETUPSTAT during USB BUS RESET

When the host sends a setup packet immediately after the bus RESET,
it is possible that due to interrupt latency the USB software observe
both USB BUS Reset Interrupt and USB interrupt for SETUP packet(UI) bits
getting set at the same time. The USB Interrupt SW routine handles the
reset interrupt as it has more priority than UI interrupt and clear the
ENDPTSETUPSTAT register. If the software clears this register, it will
not know that a SETUP packet arrived.

Fix the issue by not clearing the ENDPTSETUPSTAT during usb bus reset
processing. When USB HOST sends SETUP Packet, device controller sends ACK
and sets ENDPTSETUPSTAT bit and asserts USB Interrupt so that SETUP packet
can be correctly read by the software.

CRs-Fixed: 669902
Change-Id: I86656cfcd70d7bc8e1e84604fdbdccc6437c85b6
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
Merge "ASoC: Change Ear PA disable sequence"
Merge "usb: ci13xxx_udc: Do not clear ENDPTSETUPSTAT during USB BUS RESET"
msm: kgsl: Enable protected mode for A3XX

Enable protected register mode for A3XX with these commits from
msm-3.10:

msm: kgsl: Enable protected register mode for A3XX
msm: kgsl: Print the register that causes a protected mode error
msm: kgsl: Unprotect the VBIF performance counters

Change-Id: Ic0dedbad950ffbd063fd861d9440bb5dce8d5fb1
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Protect SMMU registers from being written by the GPU

Put the SMMU register range in protected mode to shield them from
IB1/IB2 writes from userspace.

CRs-Fixed: 599971
Change-Id: Ic0dedbad8c03fc1c54ff73221231e2440d3c34dd
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Protect CP_STATE_DEBUG_INDEX

Put CP_STATE_DEBUG_INDEX and CP_STATE_DEBUG_DATA under protection
to keep it from being written from an IB1. Doing so however opens
up a subtle "feature" in the microcode: memory read opcodes turn off
protected mode in the microcode to do the read and then turns it
back on regardless of the initial state. This is a problem if the
memory read happens while protected mode is turned off and then we
try to access a protected register which then complains and goes boom.

To account for this irregularity explicitly turn back off protected
mode in all the places where we know this will be a problem.

Change-Id: Ic0dedbad1397ca9b80132241ac006560a615e042
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Merge "msm: kgsl: Enable protected mode for A3XX"
Merge "msm: kgsl: Protect SMMU registers from being written by the GPU"
Merge "msm: kgsl: Protect CP_STATE_DEBUG_INDEX"
power: qpnp-charger: fix charger valid check issue

Currently we use USB_CHG_PTH_STS(0x1309) to check whether charger is
valid in usbin_valid interrupt handler. Unfortunately it has
no debounce time and if USB_IN has a spike over UVP threshold
and comes back quickly, reading will be '0x10' by mistake. Fix this
by reading USBIN_VALID_RT_STS(0x1310) instead, which based on properly
debounced time.

Change-Id: Ia67a4bb433b6978a4b05a7419817e722b629ab41
CRs-Fixed: 623946
Signed-off-by: Zhenhua Huang <zhenhuah@codeaurora.org>
Merge "power: qpnp-charger: fix charger valid check issue"