ASOC: Fix mutex unlock issues for error cases

Unlock mutex acquired within the same function during
error case handling, which was not unlocked before.
This could affect system stability if there are issues
in buffer memory allocations

Change-Id: I250dcb915181f4824375e31ab882ca021e61a65f
Signed-off-by: Swaminathan Sathappan <Swami@codeaurora.org>
msm: kgsl: Add VBIF error detection

Enable VBIF error interupts, and dumping the VBIF error
registers inside of the A3XX interrupt handler. Because
of the possiblity of false positive errors, use
KGSL_DRV_INFO to restrict the output to the info log level.

Change-Id: Ic0dedbad527fc616da709a79419cc2f4f5347001
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Remove deprecated CP_SET_DRAW_INIT_FLAGS function for A22X

Remove a deprecated CP opcode previously used on A22X GPUs.

Change-Id: Ic0dedbad4702bd1f795fce8d203e9664ac057e1b
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
wcnss : Add more arguments to Thermal Mitigation APIs

Thermal mitigation event handle functions needs device
context to handle the event properly.

CRs-fixed: 364094
Change-Id: I2afa87eba755f082018510e9bfa6962392f591fd
Acked-by: Leo Chang <schang@qca.qualcomm.com>
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
msm: camera: enabled flash driver support with TPS61310

The tps61310 drives the LED flash in the target 8930.
The driver support for the same is enabled with sensor 3L1.

CRs-Fixed: 359982
Change-Id: I2c3027cbb7bc9db57e081840de9972e3ac802e88
Signed-off-by: Jeyaprakash Soundrapandian <jsound@codeaurora.org>
defconfig: enabled flash driver support with TPS61310

The tps61310 drives the LED flash in the target 8930.
The driver support for the same is enabled.

CRs-Fixed: 359982
Change-Id: Ifeeb492e3f5125ed6e88c76c5ba9af5584b35b23
Signed-off-by: Jeyaprakash Soundrapandian <jsound@codeaurora.org>
usb: gadget: add check of existing swfi_latency before updating request

Before calling pm_qos_update_request a check for swfi_latency was added
to prevent calling it with un-initialized request (in platforms that do
not support this feature yet)

Change-Id: I6f05c7c6aad4deafc048d2988415b56a731e0ad6
Signed-off-by: Ofir Cohen <ofirc@codeaurora.org>
ASoC: msm8930: Add mixer control to configure PMIC speaker Gain

On 8930, the codec lineout is routed to PMIC speaker amplifier.
It is required to set the gain on the PMIC amplifier in order
to achieve audible audio output on speaker.

Add mixer controls to configure PMIC speaker gain

Change-Id: I4ef8087faac45bd676919aa9ca99734535e3992a
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
msm_fb: display: Keep fb1 for MDP version < 4.0.2

For better memory usage, fb1 memory allocation is removed for
targets like 8960 which support BF pipe and true mirroring but
required for targets like 7x30 and 8660 which still needs fb1
for border fill.

CRs-fixed: 364669
Change-Id: Id741223a0107e356b9164b582aa1f901caa21988
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
usb: gadget: Add support for USB going into LPM on bus suspend

This change adds the ability of the msm_otg to go to LPM when
USB cable is connected and bus is suspended.
This ability is enabled by a board file parameter.

The msm_otg is notified about SUSPEND/RESUME events via the
UDC layer. New event for RESUME was defined for that.

Change-Id: Ic508f1898cc3b57ab76eccd379bea38ed363570b
Signed-off-by: Amit Blay <ablay@codeaurora.org>
msm: rotator: Call S/W reset on AXI bus error interrupts

Call Rotator S/W Reset when AXI bus error interrupts are
seen during a rotate request

CRs-fixed: 341947
Change-Id: Iab64a79829ca93019cfd54505014ed168cf74464
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
msm: smd_pkt: Add new SMD channel to communicate with WCNSS

RILD in user-space wants to have a point-to-point communication with
WCNSS. So add a new SMD channel and export a device interface to that
channel.

CRs-Fixed: 364590
Change-Id: I4b05ded2154e8422b8d8700b416d52aa4dfbd149
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
msm: camera: Configure sensor exposure setting

While returning to preview after snapshot, preview session is
started with exposure setting of snapshot. There is a flicker in
preview screen due to this. Store exposure setting during preview
and use it while returning from snapshot.

CRs-fixed: 360384
Change-Id: Idad068f00613e4cc1d052e9b810f484173b39689
Signed-off-by: Sreesudhan Ramakrish Ramkumar <srramku@codeaurora.org>
ASoC: apq8064: Add mechanical switch headset detection support

The APQ8064 supports MBHC mechanical headset detection via APQ GPIO.
Configure GPIO to receive the insertion/removal interrupts

Change-Id: I695f8fbe8f19e0bec96b001321c715135dfeb718
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
mmc: core: Add packed command feature of eMMC4.5

This patch adds packed command feature of eMMC4.5.
The maximum number for packing read(or write) is offered
and exception event relevant to packed command which is
used for error handling is enabled. If host wants to use
this feature, MMC_CAP2_PACKED_CMD should be set.

Change-Id: I8013970fc9d54da7d92b0aca2bb0746189b9825b
Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Maya Erez <merez@codeaurora.org>
block: ioctl support for sanitize in eMMC 4.5

Adding a new ioctl to support sanitize operation in eMMC
cards version 4.5.
The sanitize ioctl support helps performing this operation
via user application.

Change-Id: I79aa4163e7753a75bed5a26a9a92de902b4b9c21
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
arm: vfp: Bounce undefined instructions in vectored mode

Certain ARM CPU implementations may not raise a floating-
point exception whenever deprecated short-vector VFP
instructions are executed. Change the VFP exception
handling code to emulate short-vector instructions even
if FPEXC exception bits are not set.

Change-Id: I2443d09a92c8947343126a3b6c2a074af1a62057
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
ALSA: Add jack type SND_JACK_UNSUPPORTED

Add a new snd jack type SND_JACK_UNSUPPORTED to notify when unsupported
plug type is detected.

Change-Id: I1e9907f063a65e7797f967c5d6a77a62b11f95a2
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
ASoC: apq8064: Add module MBHC module parameters

Add boolean module parameters hs_detect_use_gpio and hs_detect_use_firmware
The hs_detect_use_gpio enables MBHC mechanical detection,
hs_detect_use_firmware makes codec driver to read MBHC calibration firmware
from filesystem.  Both of them are set to false by default.

Change-Id: I7c5e5fa64f6da2eb0a448b9c649f29d21befcf4b
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
msm_fb: display: Flush MDP registers before staging up any pipe

Add flush calls to MDP's pipe and mixer registers before staging
up any pipe to a mixer.

Change-Id: I36f5aa04634bae43a38e57cd97bd2aafe9631eda
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>