msm: acpuclock-krait: Work-around retention corner-case

The CPU clock source MUXes cannot switch while a CPU is in
retention, but callers of acpuclock APIs may not known that
the CPU is in retention.

Work around this problem be always performing the CPU MUX
switch on the affected CPU using smp_call_function_single()
in cases where cross-calling might otherwise be possible.
The one exception to this is during hotplug code paths,
where cross-calling is expected by design (since the target
CPU is not online and cannot be in retention).

Change-Id: I76b6de436e71da7979f30bdce841f414c26bfe44
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
ASoC: msm: qdsp6v2: Fix voice rx/tx mute after SSR

If SSR happens during device switch while voice call is in progress
then end voice call is not handled properly. Because of this
when next call comes start voice command is ignored and voice call
does not start. Update voc states appropriately to fix this issue.

CRs-Fixed: 509508
Change-Id: Icd55b7b39a1588df97fcd631498f32197c1c7a19
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
ASoC: msm: Unmap all ACDB memory with Q6 when ACDB driver closed

Call into all Q6 drivers to unmap all memory being used by Q6.

Change-Id: I971564bc80373877559679a95aab5529637d29a1
CRs-fixed: 505503
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>

Conflicts:

	sound/soc/msm/qdsp6v2/q6voice.c
	sound/soc/msm/qdsp6v2/q6voice.h

Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
ASoC: msm: qdsp6v2: Fix for invalid mem handle after ADSP SSR

Setup a voice call and end the call. Trigger ADSP SSR, then make another
voice call. The memory handle got from the first call is provided to CVD
for calibration data for the second call. The memory handle is not valid
after ADSP restarts.
To fix the issue, after ADSP SSR is triggered, set calibration memory
handle to zero. When starting a new call, send VSS_IMEMORY_CMD_MAP_PHYSICAL
to cvd to get a new memory handle. Use the new memory handle to register
calibration.

Change-Id: Ie89e16c8e64e1acc1c324d25bead93945d3282d4
CRs-fixed: 504113
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
msm_serial_hs: Add ioctl support for UART Clock on/off request

This change adds support for ioctl implementation in HSUART
driver. UART Client application (e.g. Bluetooth) can make
request for UART Clock on/off using the ioctl mechanism.
UART Clock status also can be queried using this mechanism

CRs-Fixed: 496245
Change-Id: I9531cf2f9eda487082b9719341c5ad84c15ad5f7
Signed-off-by: Saket Saurabh <ssaurabh@codeaurora.org>
msm_serial_hs: Vote for clocks during tty close

While BT operation is in progress, it's possible for
client functions to explicitly turn off the
UART clocks without notifying TTY layer.  Then when
TTY layer tries to access UART, L2 error happened because
of un-clocked registers. Since there is no clear way
to notify clients to turn on clocks before TTY access
UART driver will implicilty turn on the clocks

CRs-Fixed: 505225
Change-Id: Ia9958658465a6c0e5af66cd932e8e694cc12b78c
Signed-off-by: Naveen Kaje <nkaje@codeaurora.org>
ASoC: msm: qdsp6v2: fix broken AFE memory unmap

AFE memory map receives memory map handle from ADSP and needs to pass the
handle when requests memory unmap.  Current afe driver incorrectly sends
physical memory address instead so memory unmap always fails.
Pass memory map handle to fix broken AFE memory unmap command.

CRs-fixed: 510179
Change-Id: I3c8b957b7953379bc96ba6f1de317eddf7783e8d
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
mm-audio: aud_acdb_util: Fix ADM custom topology

When AANC was added an enum was changed that affected ADM
custom topology and TX audproc vol cal. If ADM custom
topology was used the memmap handle for TX audproc volume
would be overwritten. This fixes that logic.

Change-Id: I8c0a13d0a3c0359537508b7ca9a34faf8cd267b4
CRs-fixed: 515406
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
hwmon: qpnp-adc: Fix potential errors

There is a possibility of potential out of bound array
access errors and uninitialized variable access from code
inspection. Add additional checks in voltage ADC and
TSENS to check for such errors.

Change-Id: I1213cd76fb636aa457c88d3bdc3740b692f01cce
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
thermal: msm: tsens: Notify thermal framework on threshold cross

Notify thermalsys framework and thereby the driver, using the new
sensor api. Notification is done in the interrupt handler context to
the thermal framework.

Change-Id: Ifdb958105d8d0d9d8987a4e64114101ee44047d2
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
usb: ehci-msm: Fix LOW Speed device enumeration issue

Disable ULPI_TX_PKT_EN_CLR_FIX which is valid only for HSIC core.
It otherwise causes enumeration failures with low speed devices.

Change-Id: I987bba3a8e0d609b6de6b5d33e11ca3bb0e03b1c
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Merge of Sony Release 14.1.G.1.531

Change-Id: I50f41a60e703eec0c1f1d5ff7d879ea9fb5795b8