HSIC_HOST: Wait for BAM Pipe to be empty before suspend

HSIC_CONS release notification doesn't confirm that all IPA HSIC BAM pipes'
are empty used for HSIC host mode functionality. In some of regression
testing, it has been found that HSIC host is being suspended when there is
data pending in HSIC IPA BAM pipe which causes BAM data stall issue. Hence
this change adds required support to check all used BAM pipes' state with
HSIC Host mode before performing suspend and notifying IPA driver to switch
of IPA clocks.

This change also checks pipe state before resuming root hub in resume
sequeunce, and would crash device if there is any pending data i.e. data is
written to HSIC BAM when HSIC host was suspended.

CRs-Fixed: 711785
Change-Id: I207a99e9cec0516f41f3991d13f673b6ab371736
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Bikshapathi Kothapeta <bkotha@codeaurora.org>
ASoC: msm: Fix ADM GET PARAM callback

Add size check on inband get param call and do
not process inband if RTAC is active.

Change-Id: I2c099f5ea254a214f224dda556773a7fe6754fe5
CRs-fixed: 548397
Signed-off-by: Ben Romberger <bromberg@codeaurora.org>
f_rmnet: Disconnect IPA on USB suspend if remote wakeup is disabled

If USB host doesn't enable remote wakeup feature on RMNET device
then it is not allowed to wakeup the usb bus after bus suspend.
If IPA is willing to wakeup the USB bus as part of CONS request,
USB cannot wakeup the host and therefore cannot grant the consumer.
This causes IPA resource manager to timeout and stall.
Therefore in case of remote wakeup disabled, avoid the IPA side
request for HSUSB CONS by tearing down data path with IPA.

Change-Id: I57218abe7d18d59fc7092883ceeef426fb05aa5f
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Merge "HSIC_HOST: Wait for BAM Pipe to be empty before suspend"
Merge "ASoC: msm: Fix ADM GET PARAM callback"
usb_bam: Fix bug while handling pending bam_reset

Driver doesn't clear pending_bam_reset flag after
resetting BAM and may end up performing reset on
every connect.

Change-Id: I166dfc95f75f41737a42c7dfd281505ceca51ee7
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
msm: clock: Add parent fields to gcc_ce1_clk and gcc_ce2_clk

The votable CE core clocks should be linked up to their
parents. Add the parent fields to these clocks for
MSM8974, MSM8226, and MSM8610.

CRs-Fixed: 572028
Change-Id: Ia5567b2832cdb97f08052017d314f00dbdd41133
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Merge "msm: clock: Add parent fields to gcc_ce1_clk and gcc_ce2_clk"
usb: gadget: qc_ecm: Release EPs if disable happens before set_alt(1)

DATA EPs (bulk IN/OUT) are used only after set_alt(1). If disconnect
(disable) happens before this then EPs are configured again based
on the stopped. Things work fine if there is no change in speed on
next connection. Otherwise for a scenario like below device ends up
using wrong maxPacketSize with endpoint.
 -ECM gadget connects in FullSpeed
 -SET_CONFIG happens: This results in set_alt(0)
 -Disconnection and reconnect in HighSpeed
 -SET_CONFIG
 -set_alt(1) for ECM.
This results in ECM using 64bytes maxpacket size in high speed and
may result in data stall.

Fix this by explicitly clearing ep->driver_data on disconnect.

CRs-Fixed: 722950
Change-Id: Ieb6b333195387e42df35f76b40ac1e171d46b1da
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Merge "usb_bam: Fix bug while handling pending bam_reset"
Merge "f_rmnet: Disconnect IPA on USB suspend if remote wakeup is disabled"
Merge "usb: gadget: qc_ecm: Release EPs if disable happens before set_alt(1)"