qup_i2c: Add runtime PM support to I2C QUP controller

Runtime PM is used to turn clocks on and off when the
controller is not in use. When the controller is used
for messaging, pm_runtime_get_sync is called before
sending the message. pm_runtime_mark_last_busy and
pm_runtime_put_autosuspend are called when message
is sent and/or response is received.

Change-Id: Icb1d6e6ad222663c9a3598da10bdc154845083a0
CRs-Fixed: 406910
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
Signed-off-by: Manish Kumar <manishku@codeaurora.org>
qup_i2c: Manage gpio configuration from runtime pm.

Due to gpio_request and gpio_free calls are made from
multiple places in i2c driver code and can cause erroneous
condition where same gpios are assigned/freed multiple times.

Move the gpio reques/free calls under runtime pm to
manage better.

CRs-Fixed: 432971
Change-Id: Ic44202e0743fa56806a0612243d3b800bad1433f
Signed-off-by: Alok Chauhan <alokc@codeaurora.org>
Signed-off-by: Manish Kumar <manishku@codeaurora.org>
media: dvb: mpq: Fix warning about uninitialized variable

A new compiler generated a warning about a variable that may
be used uninitialized. To avoid this warning, initialize variable
to zero.

Change-Id: I119ca4952e8185140b02fda2c65651989892d5db
Signed-off-by: Liron Kuch <lkuch@codeaurora.org>
Merge "power: pm8921-charger: don't apply kickstart unless it is 8921 pmic"
ASoC: msm: Fix for proxy port open failure in WFD session

When playback is paused and proxy device disabled, afe is
not closed. This results in failure of proxy port open in the second
iteration. Fix the same by closing and opening the proxy.

Change-Id: Idfa94e5756d87e59dc0101fd688d6accfe6287e7
CRs-Fixed: 447001
CRs-Fixed: 446504
Signed-off-by: Satya Krishna Pindiproli <satyak@codeaurora.org>
tspp: Add option to read TSIF clock reference counter

Reading the current value of TSIF clock reference counter
is required by some application.

Change-Id: I0fceb46ee50b8c76674ea9b8169e0b31f63fba3d
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>

Conflicts:
	arch/arm/mach-msm/include/mach/msm_tspp.h
	drivers/misc/tspp.c
tsif: Add option to read TSIF clock reference counter

Reading the current value of TSIF clock reference counter
is required by some application.

Change-Id: I5ca2a280f864fbb9c4a69518ce9672538f9c8489
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>

Conflicts:
	include/linux/tsif_api.h
media: dvb: mpq: Add option to read current STC value

Reading the STC value from TSIF interface
is required by some application.

Change-Id: I180c54f1c74b3f82741c085880b6887bb7182d53
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
Merge "qup_i2c: Add runtime PM support to I2C QUP controller"
Conflicts:
	drivers/i2c/busses/i2c-qup.c
Merge "qup_i2c: Manage gpio configuration from runtime pm."
msm_fb: display: keep borderfill pipe's iommu info

Keep borderfill pipe's iommu info during base layer pipe
swap with original base layer pipe. Otherwise, borderfill
pipe's may contain original base layer pipe's iommu info
which cause iommu page fault due to same iommu buffer is
unmapped two times.

CRs-fixed: 436711
Change-Id: Ibdb792055287283c4449db07c2de2901aa4fe9b6
Signed-off-by: Kuogee Hsieh <khsieh@codeaurora.org>
msm: clock-8960: Add support for hardware clock gating on 8960ab

Sufficient testing has proven that hardware clock gating works on
8960ab. Enable the proper bits so that hardware clock gating is
used on 8960ab for the below clocks:

mmss_fpb_clk
imem_ahb_clk
dsi2_s_ahb_clk
dsi_s_ahb_clk
hdmi_m_ahb_clk
hdmi_s_ahb_clk
vcodec_ahb_clk
gfx3d_ahb_clk
ijpeg_axi_clk
vcodec_axi_clk
imem_axi_clk
mdp_axi_clk
fab_msp_axi_clk
rot_axi_clk
vpe_axi_clk
axi_s1_clk
axi_s2_clk
axi_s0_fclk
axi_s1_fclk
axi_s2_fclk

Note that the hardware clock gating on gfx3d_axi_clk is not enabled
on this target as testing has shown that having it enabled leads to
UI hang after boot.

Change-Id: I6bd9307a71b3af625b4dee8242a689a055163098
Signed-off-by: Tianyi Gou <tgou@codeaurora.org>
(cherry picked from commit 40ce88935ce62cc13026c02dbaa4212f4a4ad282)

Conflicts:
	arch/arm/mach-msm/clock-8960.c
Merge "gpu: ion: Request highmem pages for IOMMU heap"
Merge "Revert "msm: cache_erp: Handle recoverable L1 errors""
tty: n_smux: Mask power collapse support

If power-collapse is supported locally, then SMUX will always set the
power-collapse supported flag in an OPEN ACK which may cause confusion
for the remote side.

Mask power-collapse enabled with the value in the remote open
acknowledge message.

CRs-Fixed: 443770
Change-Id: I8ceb753e25a53d13fa5b5288457e8b1993452a18
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
ASoC: msm: proper error code for drain ioctl

If a drain ioctl on a compressed driver has been interrupted
by a reset ioctl, we need to return a proper error code for the
drain ioctl

Change-Id: I15f42a22b1cc13b3a0e2ae873adfcd1db2ac1e53
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
CRs-Fixed: 445370
ASoC: msm: Allow drain only if a write was called

For compressed drivers, allow the drain ioctl only if
there are pending writes. Return a proper error (-EWOULDBLOCK) otherwise.

Change-Id: I4799351a8930c44d88d6968802df98896fc1531a
Signed-off-by: Haynes Mathew George <hgeorge@codeaurora.org>
CRs-Fixed: 445370
Merge "Revert "msm: debug: disable JTAG debugging and tracing across power collapse""
Conflicts:
	arch/arm/mach-msm/Kconfig
Merge "coresight: split qdss config to more granular coresight configs"
Conflicts:
	arch/arm/configs/msm8960-perf_defconfig
	arch/arm/configs/msm8960_defconfig
	arch/arm/mach-msm/Kconfig
	drivers/coresight/Kconfig
	drivers/coresight/Makefile
Merge "coresight: support for etr to usb output"
Conflicts:
	drivers/coresight/coresight-csr.c
	drivers/coresight/coresight-priv.h
	drivers/coresight/coresight-tmc.c
	drivers/coresight/coresight.c
	include/linux/coresight.h