msm: sdio: Add support for sdio download restarts

The existing downloader setup doesn't handle modem restart use cases.
Add support to be able to handle this.

Change-Id: I10e3755ef1d4857e228e931e60c80f1df3c692e2
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
msm: sdio: Fix memory leak

Release the tty_driver struct on all exit paths to avoid memory leaks.

Change-Id: Ib4529f120e70b343e55e72122f19a877a8bc0503
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
ASoC: msm: Use spin lock to protect the shared data

Two different locks (spin lock and mutex lock) are used
to protect the shared data, this may cause kernel panic.
Use spin lock to protect the shared data between interrupt
function and non-interrupt functions.

Change-Id: Iba07a4f1fc33c492bc34b38a47ec839eb8e6d3fd
Signed-off-by: Vidyakumar Athota <vathota@codeaurora.org>
sched: provide per cpu-cgroup option to notify on migrations

On systems where CPUs may run asynchronously, task migrations
between CPUs running at grossly different speeds can cause
problems.

This change provides a mechanism to notify a subsystem
in the kernel if a task in a particular cgroup migrates to a
different CPU. Other subsystems (such as cpufreq) may then
register for this notifier to take appropriate action when
such a task is migrated.

The cgroup attribute to set for this behavior is
"notify_on_migrate" .

Change-Id: Ie1868249e53ef901b89c837fdc33b0ad0c0a4590
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
arm/dt: msm8974-liquid: Add vreg, chip_pwd  data to AR3002 node

Add the vreg data required to power on AR3002 bluetooth chipset.

Add gpio-regulator node, to control chip level reset gpio which
is common between wlan and bt combo chip.

Change-Id: I58eca40da84117ece53f0413ba570f53d11aa069
Signed-off-by: Ram Mohan Korukonda <rkorukon@codeaurora.org>
USB: Allow udc_probe to return success when registering trace fails

mdm9x15 currently does not support tracepoints so trying to
register a tracepoint would result in udc_probe failure.
This fix allows udc_probe to return success even if registering
the trace fails.

Change-Id: I8a616fc79de5c34c19fc9d19b66a0cdde76db990
Signed-off-by: Bar Weiner <bweiner@codeaurora.org>
qpnp: pwm: Amend the GPLED LPG channel boundary check

There should be an "AND" condition instead of "OR" to check
for GPLED LPG channel boundary check. Amend the bug.

Change-Id: I8430a5b5fa0b9b20dc1ec23e42ab39f45866addd
Signed-off-by: Jay Chokshi <jchokshi@codeaurora.org>
EHCI: HSIC: Abort system suspend if controller is outside LPM

98089c0d commit (USB: Prevent system suspend when HSIC device
is active) ensures that USB devices are auto suspended before
system suspend begins.  Apply the same policy to HSIC controller
platform device.  This will cover the corner case where controller
and root hub are resumed after root hub system suspend routine
returns success.

CRs-Fixed: 482498
Change-Id: I604b24775e1c2f52020161c236c44c20d579d5e0
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
ASoC: wcd9320: set bitwidth only on ports belonging to given DAI

Existing implementation sets all SLIMBUS RX ports to same bitwidth
setting. For concurrency use case, this logic will interfere with
configuration of all RX DAIs. Enhance the logic to only set bitwidth
for ports associated with given DAI.

Change-Id: I4284bc97858115bf3bd4baff91193b400d2a6d12
Signed-off-by: Patrick Lai <plai@codeaurora.org>
ASoC: msm: qdsp6v2: Enable speaker protection with default values

Feedback Speaker protection feature should be enabled
even if speaker calibration is pending for playback
usecases via speaker.
DSP will pick the default values from acdb params
for speaker protection.

Change-Id: I9f77d35e4406a656560415a43669264111c9c6f5
Signed-off-by: Gopikrishnaiah Anandan <agopik@codeaurora.org>
diag: Fix writing of error message for mode command

Currently, when a mode command that is not the mode reset command
is sent, a kernel error message is written. This is wrongfully written.
Make changes so that when a mode command is sent that is not the
mode reset command, an error message is not wrongfully written.

Change-Id: I07666d5cda3c63804cc1dffc7cf1672915c02c1f
Signed-off-by: Dixon Peterson <dixonp@codeaurora.org>
ASoC: msm: qdsp6v2: Set correct default channel map on adm

The default channel map set on adm is not correct. LFE and FC is
interchanged. Correct this entry for multichannel playback on wifi
display.

CRs-Fixed: 482570
Change-Id: Ie82aa33c59d33efd02ca3f8d4507d5ef6744d857
Signed-off-by: Krishnankutty Kolathappilly <kkolat@codeaurora.org>
usb: bam: Allow apps to wakeup using BAM IRQ

To allow VDD min, we need to put the APPs core into suspend
power collapse.  At the moment, the BAM IRQ is not labeled as
wakeable, so it will not be able to wake the apps. This fix will
allow the core exit VDD min.

Change-Id: I6ef4a53ce5b553ce98bc7537aa2076a511ffb87d
CRs-Fixed: 467747
Signed-off-by: Bar Weiner <bweiner@codeaurora.org>
msm: kgsl: Add a ftrace event for active_cnt

Add a new ftrace event for watching the rise and fall of active_cnt:

  echo 1 > /sys/kernel/debug/tracing/events/kgsl/kgsl_active_count/enable

This will give you the current active count and the caller of the function:

  kgsl_active_count: d_name=kgsl-3d0 active_cnt=8e9 func=kgsl_ioctl

Change-Id: Ic0dedbadc80019e96ce759d9d4e0ad43bbcfedd2
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: ASoC: add empty element to device matching table

Voip platform driver registers twice instead of once because
of the missing empty array element in device tree matching
table.

Change-Id: Ib1b7cf395c35cb92dfbfbb6465589fe9f136f6d3
Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
msm: Fix compile error due to incorrect include path

Trace header file location moved under <mach> to
fix cross compilations error.

Crs-fixed: 447863
Change-Id: Icb00dc6ebdba715ad1c432e2a8a9b34fcf3a08bd
Signed-off-by: Hanumant Singh <hanumant@codeaurora.org>
arm/dt: msm8226: Add ADC_TM node

ADC_TM is used by clients to set recurring measurements
and set temperature threshold and receive notification
when thresholds are crossed. Clients include pa_therm,
batt_therm, die_temp and vbatt.

Change-Id: I9ff66c57b421cf7fc3d1145b06b34ac784fbb01e
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
arm/dt: msm8974: increase audio heap size by 3MB

To support multiple(upto 4) instances of tunnel audio playback
sessions we need more memory

Change-Id: I9ea2ba38f7228e45e8edf71831d8c0762dcff7dd
Signed-off-by: Jitendra Singh Naruka <jnaruk@codeaurora.org>
mdss: hdmi: correct timeout value

This change corrects the timeout decrement logic to enter
the error handling in case of timeout during HDCP authentication.

Change-Id: I2dabed5285768e801af27686abc26e6df19949c8
Signed-off-by: Ajay Singh Parmar <aparmar@codeaurora.org>
msm: ipc_logging: Replace spinlock_t with rwlock_t

Currently with the spinlock, all drivers are serialized(SMD_PKT,
BAM_DMUX etc.) when they try to log into the IPC logging even though the
drivers log into their own context space. The read/write lock will
enable multiple drivers to log into their context space in parallel.
This will help more in the case of drivers which are
performance-critical like BAM_DMUX.

ipc_log_context_list is read often and updated rarely so replace the
usage of spinlock_t with rwlock_t.

Change-Id: I91f18ef67b80edf6f045f93f51ad2f48e46b3bb4
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>