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>
msm: mdss: Move histogram completion initialization to pp_init

The histogram completion structure only needs to be initialized fully
once, and this can be done when the pp resource structure is created.
Otherwise, when enabling the histograms, it is sufficient to use the
reusable INIT_COMPLETION, in order to avoid any wait_queue errors.

Change-Id: Id4bfb19c91bd5ab07c01a5eb347ba50621fe8a97
Signed-off-by: Benet Clark <benetc@codeaurora.org>
Signed-off-by: Krishna Chaitanya Parimi <cparimi@codeaurora.org>
Merge "msm: mdss: Move histogram completion initialization to pp_init"
Merge "ASoC: Change Ear PA disable sequence"
msm: camera: Fix various small issues in Actuator driver

Bound check and validate userspace parameters direction,
number of steps and direction sign. Also fix possible
memory leak in certain error cases.

CRs-Fixed: 511349
Change-Id: Icaa324468574494fb40f2de78e522090806744cb
Signed-off-by: Yiduo Wang <yiduow@codeaurora.org>
unix: fix a race condition in unix_release()

As reported by Jan, and others over the past few years, there is a
race condition caused by unix_release setting the sock->sk pointer
to NULL before properly marking the socket as dead/orphaned.  This
can cause a problem with the LSM hook security_unix_may_send() if
there is another socket attempting to write to this partially
released socket in between when sock->sk is set to NULL and it is
marked as dead/orphaned.  This patch fixes this by only setting
sock->sk to NULL after the socket has been marked as dead; I also
take the opportunity to make unix_release_sock() a void function
as it only ever returned 0/success.

Dave, I think this one should go on the -stable pile.

Special thanks to Jan for coming up with a reproducer for this
problem.

CRs-Fixed: 660580
Change-Id: I0e39b84464cf3f4c9daf8677bba444d0d6d94825
Reported-by: Jan Stancek <jan.stancek@gmail.com>
Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-commit: ded34e0fe8fe8c2d595bfa30626654e4b87621e0
Git-repo: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/
Signed-off-by: Vignesh Radhakrishnan <vigneshr@codeaurora.org>
arm: mach-msm: Remove the unused rmt_storage code

The rmt_storage module is no longer used.
Remove the unused module and cleanup the makefile and kconfig.

CRs-Fixed: 549951
Change-Id: Ie9ebaa2209ea9fa0df05dc892504fcb882f00f29
Signed-off-by: Nikhilesh Reddy <reddyn@codeaurora.org>
Merge "arm: mach-msm: Remove the unused rmt_storage code"
Merge "msm: camera: Fix various small issues in Actuator driver"
Merge "unix: fix a race condition in unix_release()"
power: qpnp-charger: add support for external current sensing OVP

On some MSM8x26 platforms, board configurations exist which utilize
a current sensing OVP to allow adaptive input current limiting
to accurately measure the current flow through the external parallel
USB path.

Add support for this external OVP part by allowing an MPP to be
configured as a sense line and exposing the converted current
reading via a module parameter which is accessible to userspace.

CRs-Fixed: 651261
Change-Id: Idb47430476c1c19f58a4836a15841b95187baf77
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Merge "power: qpnp-charger: add support for external current sensing OVP"
msm: mdss: Add support for dynamic mode switch

Add support for switching between dsi command mode and
video mode and vice versa at runtime. If the panel is
configured in video mode, it would be power efficient to
dynamically switch to command mode on need basis. This
change adds the support by providing an IOCTL to switch
between video mode and command mode at runtime.

Change-Id: I23f0cadc0f76e0b4406c8156c3cca40782686bf0
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
ARM: dts: msm: enable dynamic switch feature

Enable dynamic switch feature flag for nt35590 video
mode panel. Add the list of commands that needs to be
sent to the panel to dynamically switch from video
mode to command mode and vice versa.

Change-Id: I0e01f41683a5ab97316ce84017cbf363a0bb2cbf
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
msm: mdss: Avoid mutex lockup in dynamic switching

Calling blank/unblank after locking the backlight mutex will result
in mutex lockup as blank/unblank would again try to aquire the same
lock. Avoid this situation in Dynamic Switching

Change-Id: I7b5e72b964b9994d98b6a3d0771239a5423c5001
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
msm: mdss: Add support for dynamic mode switch on mdp3

Add support to dynamically switch between dsi video
mode and command mode for MDP3 driver. For a panel which
is configured in video mode and can support command mode,
it would be power efficient to dynamically switch to
command mode on need basis.

Change-Id: Ifa479915babb073aabfc4be4247f1325fffe1f5e
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
ARM: dts: msm: Add wait in dynamic switch command for nt35590 panel

Add one vsync wait in dynamic switch command for nt35590 720p panel.
This makes sure after enabling the panel GRAM there is one frame
transferred before switching to command mode.

Change-Id: I8784f981a44e8ba0a9fd06f75ced69a400d4a49c
Signed-off-by: Shivaraj Shetty <shivaraj@codeaurora.org>
Merge "msm: mdss: Add support for dynamic mode switch"
Merge "ARM: dts: msm: enable dynamic switch feature"