USB: u_serial: Don't allow UDC to append and send a zero length packet

Two zero length packets are sent by the target in the current scenario:
1. From the device controller driver (as the req->zero flag is set if
   it is the last packet).
2. From the u_serial driver when the length of the packet is zero while
   checking for the next packet in the list.

Hence removing the code for the case1, as the zero length packet is
sent via u_serial function driver.

Change-Id: Ifc1bc9cf8435149534c271343ea7ef64b9ed4d4a
CRs-Fixed: 350179
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
msm: kgsl: Add functions for enabling / disabling a powerscale policy

Sometimes you want to enable or disable a policy for a bit without
actually swapping out the policy.  These functions allow the kernel
to control the policy functionality.

Change-Id: Ic0dedbad4406e5fffe1ebd8e8ba4e6bf84d82203
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm_dcvs: Update interface to get updated timer on IDLE_EXIT

TZ DCVS algorithm is updated to give a new timer value on idle_exit
in order to catch smaller CPU bursts correctly. Also protect
against a timer race condition between IDLE_EXIT and CLOCK_FREQ_CHANGE
events.

Change-Id: I1ab414e9cd582c0eb8f86f0d87fa132d709da100
Signed-off-by: Eugene Seah <eseah@codeaurora.org>
msm: usb_bam: Fix null pointer reference in connect_pipe

This change fixes a potential null pointer reference issue.

The sps_pipes array should hold references to allocated pipes.
But in connect_pipe, after the pipe is allocated, the reference
to the pipe is not saved in this array. So the array will always
hold NULL pointers. If a code will try to access a pipe reference
stored in this array, it will crash.

Change-Id: I2c1142ac38a87bf6e680983eb970c6943eabb88c
Signed-off-by: Amit Blay <ablay@codeaurora.org>
usb: gadget: revert change in f_rmnet - dropping DTR on host suspend

Revert the additional DTR droping in case of host suspend.
On 9x15 this fix prevent any Rmnet data transfer after host suspend.

CRs-Fixed: 340441
Change-Id: I20c5ce612a89b8db1cf8ed5b9dd198c4044ab922
Signed-off-by: Ofir Cohen <ofirc@codeaurora.org>
msm: kgsl: Add ftrace for A3XX interrupts

Add ftrace logging to help with debugging and profiling on A3XX

Change-Id: I626c5d694e66e6d6c062b31fc56794c3e7c58522
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
ASoC: wcd9304: Pull in pending fixes for sitar.

Fix Lineout and DMIC configurations. The configurations are similar
to tabla codec driver and hence pull in changes to sitar driver.

Change-Id: Ia00359e6f8888c08365b85423197821fc16f963b
Signed-off-by: Asish Bhattacharya <asishb@codeaurora.org>
ASoC: wcd9310: Fix headset detection with mechanical switch

If MIC bias used by MBHC is higher than 1.8v and mechanical switch
is used, currently there is a chance that headset is detected as headphone
followed by false button press.
Fix issue by adpoting a logic to enable HPHR GND and VDDIO switches during
insertion detection.

Change-Id: Ifb04c8b85e8049937462bc26b47cd199b77ce3ab
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
ASoC: msm8960: 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: I2858909e60003b81a5793fa3d9eeabd0ca340bbe
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
wcnss: add sysfs entry to support Thermal Mitigation

The Thermal Mitigation function in userspace needs a mechanism by
which it can notify the WCNSS driver that thermal mitigation is
required.  We introduce a sysfs entry via which Thermal Mitigation can
both read the current mitigation level as well as set a new mitigation
level.  Logic to actually act upon a new mitigation level will be
added at a later time.

Change-Id: I1b2b8328e2aa821414de0d345bd32b9bc30bd49a
Signed-off-by: Jeff Johnson <jjohnson@codeaurora.org>
video: msm: Add Histogram collection framework for MDP blocks

Expand the previous histogram collection implementation to support the
addition of other MDP blocks that allow for histogram data collection.
Support the VG1, VG2, DMA-P, and DMA-S histograms using this new
framework (VG pipes only supplying the histogram of luminance).

Change-Id: I94088c1f714fa5d91256ae7b0f5548f8a0b81763
Signed-off-by: Carl Vanderlip <carlv@codeaurora.org>
ASoC: wcd9310: Add the second mixer support to audio RX path

Add the second mixer to audio RX1, RX2, and RX3 path to provide
an option so that the sidetone can be generated from codec
instead of from DSP.

Change-Id: I9ffd5b833abe2d832c4f9b4c9d3ec5ab94fdbde9
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
msm_fb: display: add mixer1 writeback buf init call

mdp4_init_writeback_buf call is missing for mixer1 interface. And
blt_addr should be nulled when dtv interface is initialized,
otherwise, mixer1 writeback mode may be false enabled which causes
system crashes or garbage display on TV.

Change-Id: Idbf5fe90eb50f0a68b434f2c76012c64a38553a4
Signed-off-by: Huaibin Yang <huaibiny@codeaurora.org>
[media] DocBook: Add rules to auto-generate some media docbook

Auto-generate the videodev2.h.xml,frontend.h.xml and the indexes.

Some logic at the Makefile helps us to identify when a symbol is missing,
like for example:

Error: no ID for constraint linkend: V4L2-PIX-FMT-JPGL.

Change-Id: I2f828c48fac3c55102765efd71091bb9ab990601
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
msm_fb: HDMI: Fix EDID parsing logic for multiple data blocks

This change fixes a bug in EDID parsing logic when there are
more than one data blocks of the same type in the EDID data. With
this change, the starting offset used to scan for the next data
block, is computed correctly.

Change-Id: I5d09fe61be9f7c749197991f54e430ae3aaddbcb
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
msm: camera: Fix camera switch issue

Reset CSI1 clock branches at the time of VFE_RESET to
get START_ACK from VFE block to avoid camera switch
issue from front to back.

Change-Id: I3b097e748544c28450ca772b08e8aa43eca8f769
Signed-off-by: Suresh Vankadara <svankada@codeaurora.org>
ASoC: msm: Provide linear DSP volume

To give the higher resolution, provide the linear DSP volume gain
instead of percentage through ALSA mixer control

Change-Id: I86615d2327358ad19ff28f73ad66ced03fc0d07d
CRs-Fixed: 351468
Signed-off-by: Jay Wang <jaywang@codeaurora.org>
defconfig: msm8960: enable I2C support for smsc hsic hub

Enable support for the HSIC(High Speed Inter Chip) based
SMSC3503 hub controller present on Qualcomm chipsets.

Change-Id: Ide80d82441113553e4e43618ec73a19f0ad67be5
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
USB: EHCI: Add registers support for SMSC hsic hub

Add SMSC hub registers that can be changed over I2C bus
for changing the default configuration.

Change-Id: Ib1cd158fdd3c3f58d7211428984ca424563c4f14
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
usb: otg: Do not call runtime suspend from system suspend callback

According to the commit text of "PM: Limit race conditions between
runtime PM and system sleep (v2)", a driver should not call
pm_runtime_suspend() from its .suspend() callback, as that creates
a recursive call into the subsystem.

This fixes msm_otg_pm_suspend() from doing just that. Instead, call
the helper function to explicitly suspend, without depending on the
runtime PM call. Likewise, the system resume callback should actually
resume the device.

Change-Id: I6ef0609dc4979ad31ef338e1eee3d21af47c256b
Signed-off-by: Jack Pham <jackp@codeaurora.org>