ASoC: wcd9320: Fix offset calculation to RX connectivity registers

On wcd9310 codec, there are 3 connectivity registers for RX1, RX2,
and RX3 paths while rest of RX paths have only two registers.
Unlike wcd9310, on wcd9320, only RX1 and RX2 paths have 3 connectivity
registers, and rest of paths have two.

There is a bug in the wcd9320 which considers RX3 has 3 connectivity
registers as well so it adds one more offset to RX4-RX7 connectivity
register addresses. It  causes the codec driver to read wrong
registers which leads causes the audio sample rate setting going to
incorrect audio RX path.

Change-Id: I9d31043d664e22c8cd4cacf8710bd4ede1977046
Signed-off-by: Kuirong Wang <kuirongw@codeaurora.org>
msm: clock-8610: Add MM NoC clock for bus driver

This patch adds MM NoC clock to the lookup table for usage by
bus driver.

Change-Id: Ie4fb5fdf6bc23ed69f1df63be2fd0f42e6d9e1e1
Signed-off-by: Gagan Mac <gmac@codeaurora.org>
arm/dt: msm-pm8226: Add VADC channel

Add support to read buffered 625mV reference channel.

Change-Id: I5b74646671e1bb58c83c3dbcb4ad1e4388e6d02a
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
ASoC: wcd9306: correct headphone event type

When headphone power amplifier event callback is being called,
wrong headphone event type is passed to CODEC resource manager.
This results in headphone over current protection status not getting
cleared.

Change-Id: Id886717c83d1bd188d21ff57a6d3d76ea9e3553f
Signed-off-by: Patrick Lai <plai@codeaurora.org>
ASoC: msm: Fix to handle MAP_PHYSICAL command callback

- VSS_IMEMORY_CMD_MAP_PHYSICAL was missing from
  the callback function case list.
- Added VSS_IMEMORY_CMD_MAP_PHYSICAL to the
  switch case list for callback function.

Signed-off-by: Vicky Sehrawat <vickys@codeaurora.org>
Change-Id: I58cc5882d82e79829b6267afc2afd1e7a37c5e92
msm: kgsl: pass mmu pointer into address space query functions

This allows address space and pagetable configuration to be
set from data in the mmu, such as devtree settings.

Change-Id: I811b2d8bbac2613a0ea51795f7cd4b121ec203da
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
msm: mdm2: Decrease leakage before QSC power-up

Cleanup of IPC gpios for driver strength and toggle
AP2MDM_STATUS only after AP2MDM_KPD_PWR is toggled, this
will decrease the leakage from MSM to QSC before QSC
powering up.

CRs-Fixed: 460500
Change-Id: Iabfa34331b613dd66577e485572a809440cf5272
Signed-off-by: Taniya Das <tdas@codeaurora.org>
ASoC: Add AANC ACDB IOCTL support

Add AUDIO_SET_AANC_CAL ioctl to store the AANC calibration information
from ACDB into the kernel.

Change-Id: I5dd9019c3d8cf11c4ade2b8e59a5336929d4f035
Signed-off-by: Damir Didjusto <damird@codeaurora.org>
msm: net: ecm: dynamic debug support


This feature will allow collecting ecm_ipa
logs without the need to rebuild
the images with ECM_IPA_DEBUG_ON

Change-Id: Id170c270d6ba809f7c2d6d75cad9bc537a1bb759
Signed-off-by: Talel Atias <tatias@codeaurora.org>
ASoC: wcd9xxx: Add missing break to switch statement

It's found that breaks are missing in the switch statement of
wcd9xxx_event_to_micbias function so it falls to default always.
Add missing breaks and fix broken vddio switch.

Change-Id: I1ae108b93f27b8ba55cda16e16ec7c7a6a6fc9a0
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
ASoC: msm: qdsp6v2: Change permissions of debugfs nodes to 664

CTS verification on debugfs paths due to world-writable should
be 664. Modify the permissions of the debug fs node to 664
accordingly.

Change-Id: I5aef2d5c69ce73fe766f2c69a99ae45bafbef971
CRs-Fixed: 454805
Signed-off-by: Subhash Chandra Bose Naripeddy <snariped@codeaurora.org>
ASoC: msm8226: Change VoLTE to Voice2

Volte is not supported in msm8226.
Change the front end dai VoLTE to Voice2 to support
the second voice call.

Change-Id: If941dc89d8486fac55dd8e60a23398887669c7e3
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
iommu: msm: check range before mapping for IOMMU-v1

Make sure iommu_map_range() does not leave a partial
mapping on error if part of the range is already mapped.

Change-Id: I108b45ce8935b73ecb65f375930fe5e00b8d91eb
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
ASoC: wcd9320: Update RX control registers' default value

The wcd9320 codec version 2 has updated RX control registers' default
value.  Update default value to allow HPF output passes through ungated.

CRs-fixed: 466474
Change-Id: Iec60261cda99518dcbf829795d0ccbfa68964f26
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
msm: mdss: program priority request watermark levels

Watermark levels are used to request priority on the bus depending on
the watermark treshold set, these should be based on ammount of shared
memory pool blocks being allocated.

Change-Id: I34e157e1c2061396c7cc3ba52e6275edb2587df5
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
power: qpnp-charger: fix download mode on CDP

The qpnp-charger driver enables the USB
suspend bit and lowers the input current
limit of USB during the restart sequence.

On some platforms which do not have a
battery present this may cause a UVLO
reset and thus cause IMEM to be reset.

Fix this not setting the USB suspend bit
and lowering the input current limit if
use_default_batt_values is set and no
battery is present.

Change-Id: I5c70e1aa137c78d5c43feaa9602b7b27fbd1eb47
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
msm: mdss: remove delayed unmap/secure flags

Delayed flags are used to keep a map/secure reference count on buffers
until buffers are freed by client. This is no longer needed with current
buffer management logic, driver already manages the unmapping and
unsecuring of buffer until it is certain the buffer is no longer being
fetched/written by MDP hardware.

CRs-Fixed: 457562
Change-Id: I49a8cd033dc2d58816efedc076ed7cea8a406434
Signed-off-by: Adrian Salido-Moreno <adrianm@codeaurora.org>
msm: vidc: Add SMMU support for Q6 HFI

Q6 SMMU memory is now managed through common
iommu api. This enables iommu related api
in Q6 HFI and uses common iommu api for
finding group info and domain.

Change-Id: I194e08ab1300cba9483196bcb2f7a459c170457c
Signed-off-by: Sachin Shah <sachins@codeaurora.org>
msm: mdss: hdmi: always send offline notification when hpd is turned off

When HPD is turned off by the user, HDMI driver sends offline notification
using switch class driver. But this notification is being sent only if
there is an ongoing HDMI session. Now in cases where process which opened
HDMI framebuffer gets killed or dies for some reason, HDMI session is
turned off by closing corresponding framebuffer device. This results in
incorrect state machine of the HDMI hot-plug when that process restarts.
Correct this by always sending an offline notification when hpd is turned
off by the user.

Change-Id: I6d6201bbe52288da72cbb9c5922035b9d63fcf8a
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
PM / Sleep: Fix a mistake in a conditional in autosleep_store()

The condition check in autosleep_store() is incorrect and prevents
/sys/power/autosleep from working as advertised.  Fix that.

[rjw: Added the changelog.]

Change-Id: I231cc24fc3f245003dcf5053ff6a71eb69ffa273
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Git-commit: 040e5bf65e1ee66266bc314c5965518a7c21ff36
Git-repo: git://codeaurora.org/kernel/msm.git
Signed-off-by: Anurag Singh <anursing@codeaurora.org>