defconfig: msm8974: Enable qcedev as static modules

The qcedev device-node is used by enterprise security on boot.

Change-Id: I085884601996b912406251088ac56ea84b10d115
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
block: test-iosched: Sleep before each test

In order to be sure that the packing statistics collected after the test
reflect *only* requests issued by the test (and not real request from
FS) - sleep before each test in order to give an already dispatched
requests time to complete.

Change-Id: If2f40efad1d79084a8ea85afe93cce58e49ff698
CRs-Fixed: 453712
Signed-off-by: Tatyana Brokhman <tlinder@codeaurora.org>
msm: clock-8974: Update MMSS NOC and OCMEM NOC frequencies

Update frequencies and nominal fmax values to match
the latest documentation.

Change-Id: Ia9786b253a653fe848f6414713d650c15a68272c
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
misc: Increase dynamic number space

We've exhausted all of the 64 dynamic minor numbers in misc
devices. Ideally, we shouldn't be using so many misc devices. We
should be using cdev directly instead. Increase the number for
now so that kernel drivers don't fail to probe.

Change-Id: I514f4acc7d27b68005ec7f0a8d4ab3c0906b36ff
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
ASoC: wcd9xxx: Use appropriate logging levels

During tests where back to back playback is performed multiple
times, the logs can get flooded due to using dev_info. Correct
this to dev_dbg

CRs-fixed: 457386
Change-Id: Ia2edf91b03c99bf59318804e5fceba3347d00856
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
ASoC: msm: Update media format block with acutal number of bits per sample

Update bits per sample inside media format block to support
16/24-bit playback.

Change-Id: I64568a43b4a7f90d3ca421fcd7d074d48bd5d118
Signed-off-by: Phani Kumar Uppalapati <phanik@codeaurora.org>
cpufreq: Retain only online cpus in managed_policy->cpus

cpufreq's handling of cpu online event can incorrectly initialize
managed_policy->cpus to include offline cpus. This causes cpufreq
governors to include offline cpus in their idle time computation, which
causes frequency to shoot up beyond normal levels (on systems where 2 or
more cpus need to be synchronized wrt frequency change).

This frequency shootup was not seen prior to commit 21111be8 which
changed idle time accounting for offline cpus. Prior to commit 21111be8,
idle time statistics for offline cpus would include their offline time
as well. Post commit 21111be8, offline time is not included in a cpu's
idle time statistics.

As a result, ondemand (or other cpufreq) governors would see unchanged
idle time for offline cpus, causing them to interpret those (offline)
cpus as 100% busy, which is wrong.

This patch fixes the issue by modifying cpufreq's hotplug handling to
retain only online cpus in managed_policy->cpus field. cpufreq governors
would then skip such offline cpus from idle time calculations.

Change-Id: Id2eba8c0ec3367609369b2e42a4e1386ff2e7ab5
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
ASoC: msm: Avoid accessing audio client in cases of hw_params failure

When asm session open fails in hw_params, it frees up
audio_client. However, the subsequent session close call
tries to access this freed audio client memory. Add check
inside session close to avoid this invalid access.

Change-Id: I63d59566916172c2827dd88aacf6c0a094bf90a9
CRs-fixed: 458359
Signed-off-by: Phani Kumar Uppalapati <phanik@codeaurora.org>
msm: camera: Fix DMI 64 bit write

Updated the DMI 64 bit write to fix issues while writing
both high and low values.

Change-Id: I073bf6aab0cc7ca8789729b62519bb034a5e0deb
Signed-off-by: Nagesh Subba Reddy <nageshsreddy@codeaurora.org>
power: pm8921-charger: decrease the index by 1 except for case 0

The purpose is to get index of [0..3] instead of [0..4].

Change-Id: I736312f04edbd889ac325fe8d0180f9a38c816ca
Signed-off-by: Willie Ruan <wruan@codeaurora.org>
gpu: ion: Add ADSP heap

The ADSP heap is intended to be used for post processing
on the dsp. Add the definiton of the heap to allow clients
to have dedicated access

Change-Id: I9033e27235fe11c0cfd08c6e50e9f76f22b3eeec
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
arm/dt: msm8974: Add aDSP heap

8974 based targets have a use case for memory to be used with
the DSP for post processing. Add a dedicated Ion heap for this
use case.

Change-Id: I481c26b6621f68511acf08b0f4ed31933ccca234
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
msm: camera: Add open count check for isp buffer manager

When the second ISP open, the buffer manager should not
be initialized again. This change allow buffer manager
to be shared by two ISP.

Change-Id: I401196296dcc8b4d1eb3056c07f9b5f79c9529d0
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
msm: camera: Increase max ISP buffer queue

When two ISPs are used simultaneously, there could be
maximum of 7 image and 7 statistics output from each
ISP. Increase the maximum number of buffer queue to 28,
since two ISPs share the same buffer manager.

Change-Id: I74fab1dd6091b61db0885dd04b129accd3e81d73
Signed-off-by: Kevin Chan <ktchan@codeaurora.org>
usb: dwc3-msm: Use devm_request_irq()

Use devm_request_irq() instead of request_irq() for ease
of handling freeing of the IRQ when device is released or
if failure occurs during probe.

Change-Id: Ifc9da915dd0f9b22f02011ad8b761b37d92df077
Signed-off-by: Jack Pham <jackp@codeaurora.org>
ASoC: msm: qdsp6v2: Fix memory leaks

Fix memory leaks, possible NULL pointer dereference and
uninitialized variable usage.

Change-Id: Ie432fa8ecb36021f21169a9e549cf8e1a67a2758
Signed-off-by: Kiran Kandi <kkandi@codeaurora.org>
power: qpnp-bms: add peripheral subtype for BMS_IADC2

When the BMS_IADC peripheral was added to the BMS as a device,
the driver checked both peripheral type and subtype to distinguish
between the two.

For version 3 PMIC hardware, the IADC peripheral subtype changed as
IADC1 was updated to IADC2. Add the new subtype so BMS can probe

Change-Id: Iabcd97e110dd256d46e65a04541e30072b23a4f3
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
power: qpnp-bms: ignore invalid shutdown iavg

When the device goes through an unclean shutdown (through a watchdog
bite or otherwise), sometimes the data registers get set to 0xFF.
This causes the BMS to read a shutdown iavg of 13400mA, sometimes
forcing SoC to 0.

Fix this by checking for 0xFF in the data register before using it,
as there is no physical way the BMS could have a shutdown iavg of
13.4A.

Change-Id: Icefb81afe3173a4e895237097cc7f7681ae668cc
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
ASoC: wcd9320: Add codec dai for speaker protection

Taiko codec has the support for capturing voltage and current
drawn by the speaker and route them via slimbus tx ports.
Change adds codec dai support for enabling voltage and
current capture paths.

Change-Id: Ic9240bfabb12fe43f413c818d330aba4b00cab62
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
ASoC: msm: qdsp6v2: Add support for Slimbus tx4 port

Change adds support for enabling the slimbus tx4 port.

Change-Id: I88cafcf53b85a94a0b316c4af012773d1cbfd662
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>