msm: cpp: Attach/detach iommu device on open/close node

Change the iommu device attachement to happen on
cpp_open_node and detachment in cpp_close_node.
It decrease the power consumption when Camera is not
working.

Change-Id: I7f8d65e14af2949d9512191459d313ac4d3fff9c
Signed-off-by: Iliya Varadzhakov <ivarad@codeaurora.org>
Revert "msm: iommu: remove tlb_invalidate from the map calls"

This might cause TLB invalidate to hang on unmap calls.

This reverts commit 8da8a5a49ce5dcbb5b5f97da8d66b34129562e80.

Change-Id: Ibbe373d448a3bea5e75bc45dd0a16e79f57c092b
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Merge tag 'AU_LINUX_ANDROID_JB_3.2_RB5.04.03.00.146.030' into jb_3.2_rb5

AU_LINUX_ANDROID_JB_3.2_RB5.04.03.00.146.030 based on quic/aosp/jb_3.2_rb5

# gpg: Signature made Fri 06 Sep 2013 02:56:10 AM MDT using DSA key ID 80A901F1
# gpg: Good signature from "lnxbuild (lnxbuild account) <lnxbuild@qualcomm.com>"
msm: acpuclock-krait: Program both high- and low-performance sources

The latest LDO/BHS switching sequence employed in the 8974
krait-regulator driver involves mandatory operations that cause
the CPUs to switch to the low-performance clock source when the
CPU is powered from the LDO, and to the high-performance clock
source when powered from the BHS.

This results in potential undervolting of the CPUs since the
acpuclock driver does not program the low-performance source,
and the clock source it selects be default is running at the
same speed as DDR (which can be very fast).

Fix this by programming both the high and low-performance clock
sources to be the same at all times.

CRs-Fixed: 538629
Change-Id: Iaa39cca9165b892e52acd8ec3aac5d0784112623
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
Merge tag 'AU_LINUX_ANDROID_JB_3.2_RB5.04.03.00.146.032' into jb_3.2_rb5

AU_LINUX_ANDROID_JB_3.2_RB5.04.03.00.146.032 based on quic/aosp/jb_3.2_rb5

# gpg: Signature made Tue 10 Sep 2013 08:55:38 AM MDT using DSA key ID 80A901F1
# gpg: Good signature from "lnxbuild (lnxbuild account) <lnxbuild@qualcomm.com>"
msm: kgsl: Idle GPU after IOMMU V1 TLB flush

After TLB flush on IOMMU V1, stall prefetch parser until
GPU is idle, this guarentees GPU is completely idle
after executing TLB flush instructions. This prevents
prefetching GPU instructions which could trigger hardware
page table walk while TLB flush instructions are
sill being executed by GPU.

CRs-Fixed: 541950
Change-Id: Iaf5e577beb640bc42b9a1e29c96d06b125629860
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
Merge tag 'AU_LINUX_ANDROID_JB_3.2_RB5.04.03.00.146.035' into jb_3.2_rb5

AU_LINUX_ANDROID_JB_3.2_RB5.04.03.00.146.035 based on quic/aosp/jb_3.2_rb5

# gpg: Signature made Tue 17 Sep 2013 07:42:53 AM MDT using DSA key ID 80A901F1
# gpg: Good signature from "lnxbuild (lnxbuild account) <lnxbuild@qualcomm.com>"
msm: kgsl: Idle GPU after IOMMU V1 TLB flush

After TLB flush on IOMMU V1, stall prefetch parser until
GPU is idle, this guarentees GPU is completely idle
after executing TLB flush instructions. This prevents
prefetching GPU instructions which could trigger hardware
page table walk while TLB flush instructions are
sill being executed by GPU.

CRs-Fixed: 541950
Change-Id: Iaf5e577beb640bc42b9a1e29c96d06b125629860
Signed-off-by: Tarun Karra <tkarra@codeaurora.org>
ASoC: msm: Fix playback failure on device switch during ULL playback

When a device switch happens for ultra low latency playback, we are
opening a regular playback COPP. ULL stream is routed to a non ULL
COPP. ULL stream can be only routed to a ULL COPP. This results in
playback failures. The fix is to use the perf mode flag as a
part of front end instead of back end dai.

Change-Id: I07f3f02b1414d2826a2f2d3f79b1bc0337cd3c32
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
msm: camera: use 24MHz for camera sensor ext clk

8974 V1 hardware was not supporting 24MHz mclk.
adding support to use 24 Mhz clk from V2.

Change-Id: I3b75fe81d127b755ac9a93e35fedd9fc670566d5
Signed-off-by: Xu Han <hanxu@codeaurora.org>
msm: camera: changed imx135 sensor clock

sensor clock changed to 24MHZ to get expected frame rate

Change-Id: If52f410d08595dda0b5cca8bebcc39f9d9e51ff5
Signed-off-by: Xu Han <hanxu@quicinc.com>
Signed-off-by: Xu Han <hanxu@codeaurora.org>
hwmon: qpnp-adc: Fix panic in ADC workqueue

During warm/soft reset it is seen during qpnp-adc-tm
driver interrupt registration there are pending
interrupts.

Register the ADC interrupt handler after initializing
the workqueue to handle potential cases where interrupt
is pending when an interrupt is requested and causes
panic because the workqueue is called when its not
initialized yet.

Change-Id: Iba88ab3c9f71dc94579ab85980f8cfd726f3c5c1
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
msm: cpufreq: Move cpu_frequency_* trace points from acpuclock to cpufreq

acpuclock is not used on newer targets, so move the trace points
in it up to the generic msm cpufreq driver. Also drop the use of
the 'trace_cpu_frequency' entirely, since it's already present in
generic cpufreq code.

As a side effect of this change, these trace events will no longer
track cpu frequency changes from the power-collapse path. Only
frequency changes coming from cpufreq will be tracked.

CRs-Fixed: 535512
Change-Id: Ib69d92f5d3209a7e36be678997b79bcdac92f953
Signed-off-by: Matt Wagantall <mattw@codeaurora.org>
power: qpnp-bms: Fix memory leak

During bms driver probe set_battery_data() function is allocating
memory for struct bms_battery_data and not using that memory after
set_battery_data() function. So free memory allocated for
struct bms_battery_data at the end of function set_battery_data().

Change-Id: Iee37bfeaa334d79f0821a795707f088a786c2a1b
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
ASoC: msm: qdsp6v2: Add timestamp in voip frame header

Uplink timestamp needs to propagate to userspace for AV sync.
timestamp field is added in voip frame header to
capture the timestamp from LPASS for each uplink packet.

Change-Id: Id701df56e5a3d36bf83771ba9731c61a03dae3ba
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
Merge "msm: camera: changed imx135 sensor clock" into jb_3.2_rb5.15
Merge "hwmon: qpnp-adc: Fix panic in ADC workqueue" into jb_3.2_rb5.15
Merge "msm: cpufreq: Move cpu_frequency_* trace points from acpuclock to cpufreq" into jb_3.2_rb5.15
Merge "power: qpnp-bms: Fix memory leak" into jb_3.2_rb5.15
Merge "ASoC: msm: qdsp6v2: Add timestamp in voip frame header" into jb_3.2_rb5.15