drivers: cpuidle: sync
logger: Add an enable toggle for entry storage
msm:qdsp6v2: Check null pointer on userspace data argument in kernel

The null pointer check is required to ensure that userspace data
in kernalspace is not null.

Change-Id: I9e522c393ae643626a4bae03731a73f5d6db6458
CRs-Fixed: 563752
Signed-off-by: Mohammad Johny Shaik <mjshai@codeaurora.org>
ASoC: dapm: Change mutex lock subclass in dapm

Address the compilation issue by changing the subclass
enum in mixer/mux power update dapm functions

Change-Id: I3946cf2a5c6a0b469378d5c0583fd9c8567d4b70
CRs-Fixed: 567030
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
ASoC: dapm: Fix race condition in dapm

Dirty widget list can be accessed by multiple
paths in dapm framework. Dirty list is protected by
dapm mutex. Since stream_event function accesses the dirty list,
it should acquire dapm mutex instead of codec mutex.

CRs-fixed: 593141, 596103
Change-Id: I9f41bf436b41ba9b4fa3bb447035fd1fe262e76b
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
ASoC: wcd9xxx: Mute during Impedance detection

Verify HPH PA state before disabling PA to avoid mute
during headset impedance detection

CRs-Fixed: 578022
Change-Id: I156410c92507b20690c7576bed830563107c0d22
Signed-off-by: Sudheer Papothi <spapothi@codeaurora.org>
ASoC: msm: qdsp6v2: Add meaningful labels

Add meaningful labels to goto on error
conditions in config_debug_fs_init(). Also
added more robust error handling in same
function.

Change-Id: I160bd921e3a43a30f2bf40f532be675c1134716b
CRs-Fixed: 575229
Signed-off-by: Kenneth Westfield <kwestfie@codeaurora.org>
Revert "diag: Add new polling command"

This reverts commit 3a8344806d16e3dfc0c6f6b84b50b366ef81c42c.
slim_ngd: Handle runtime-pm resume error gracefully

Runtime-pm resume for satellite driver may fail if ADSP is going
through subsystem-restart. Handle that error, and set runtime-pm's
status to suspended if resume fails. Resume typically fails due to
failure to wake slimbus from pause_clock. Make sure another wakeup
can be tried later when ADSP comes back up

Change-Id: Ie9b798f5506de89a37491dbc3798acaa24b98808
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
slimbus: Manage channel slots only if framework manages bandwidth

If slimbus controller overrides bandwidth management, channel slots
should not be managed since controller is expected to do that.
Slimbus controller will go into idle mode due to this change when
channel setup/teardown is done. Make sure controller can transition
states correctly in runtime-pm suspend, and system-suspend case.

Change-Id: Id41aed822e3c98af8c1fe7db3a3527a1206739be
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
slim_msm: Rectify physical address type

Make sure physical address type is of correct type.

Change-Id: I9ec7a846e0fc14efd3627d141bb2228c8e56b2cc
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
msm: qmi: Match service version and instance during lookup

The remote subsystems construct instance_id from the version and service-
registered instance information. The version field is used to identify the
compatibility between client and service. The instance field is used to
uniquely identify a service from multiple instances of the same service_id
and version.

Currently the kernel QMI client interface matches only the instance during
the service lookup. Update the kernel QMI client interface to construct
instance_id from the version and instance information during lookup.

Change-Id: I2a4124ca8179d175d47c9468e907568a74281901
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Slimbus: Correct the conditional check during channel removal

Use actual channel number to check if the channel to be
removed is present in the define_chan list before removing
it, instead of using the internal channel number used by
the frame work.

CRs-Fixed: 555260
Change-Id: I4c9521f7d228ca43c155fedf2c9ba5b8f86e2d3a
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
msm: cpufreq: Fix msm_cpufreq_get_freq() for sync CPUs

When CPUs are in sync, only CPU0 has a non-NULL cpu_clk. clk_get_rate()
on other cpu_clk will return 0. msm_cpufreq_get_freq() is used in multiple
places in cpufreq framework to determine current hardware frequency.

Fix msm_cpufreq_get_freq() to return the right hardware frequency for
systems with synchronous CPUs.

Change-Id: I6a880764ad51fa9a257a328798b38d574750686a
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>
ASoC: wcd9xxx: Report lineout immediately

If extension cable is inserted into the jack, it
is taking 5 sec to report the insertion. Reduce
this delay by reporting high headphone immediately.

Change-Id: I904f232ede585c39c6b600692ddb8750b848ebcd
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
ASoC: wcd9xxx: Notify mbhc when TX1/IN1 path is enabled

Notification is sent to mbhc whenever TX1/IN1 path is used
for audio capture. MBHC then will switch to VDDIO if headset
is inserted. This is to avoid polling noise that gets captured
in the recorded audio due to noise coupling in hardware b/w
TX2 and TX1 paths.

Change-Id: Iac40f41572d1417d2afdc55438d86c047710824f
Signed-off-by: Phani Kumar Uppalapati <phaniu@codeaurora.org>
msm: lpm_levels: return new idle level to cpuidle framework

Need to return the new idle level to cpuidle framework
but just returned input value argument 'index' which is
not used actually at lpm_cpu_power_select().

CRs-fixed: 601636
Change-Id: Iabd182eeb4fbdc67f4e07b40a1b593471cf8cbdf
Signed-off-by: Anil kumar mamidala <amami@codeaurora.org>