msm: kgsl: use the same logic in adreno_idle and adreno_isidle

These two functions need to agree on the meaning of "idle",
so that calling adreno_isidle() right after an adreno_idle()
will always return true.

Change-Id: I7cddf73773186c3ec8b56c111affacac3b07fcc7
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
(cherry picked from commit 5365240cf0abf2d799dd849abca0dc5b46d4b784)
Signed-off-by: Harsh Vardhan Dwivedi <hdwivedi@codeaurora.org>

Signed-off-by: Sridhar Gujje <sgujje@codeaurora.org>
hwmon: qpnp-adc-scale: Fix batt_therm mapping table

Mapping table for batt_therm used for converting voltage
to temperature is incorrect after 65degC. Fix the voltage
to temperature mapping for values after 65degC.

Change-Id: Ib8534a2be3b66f61b4edbe8f283cfee9f873af81
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
ASoC: wcd9304: Fix dce and sta wait time

Apply correct dce and sta wait time based on calculation
rather than using default values.

CRs-Fixed: 521904
Change-Id: I15578c8ca5ba606af3d7ded85014c178ffc1effe
Signed-off-by: Simmi Pateriya <simmip@codeaurora.org>
Merge "hwmon: qpnp-adc-scale: Fix batt_therm mapping table"
msm: kgsl: use kgsl_mmu_device_setstate() whenever the gpu is idle

We really don't want new GPU commands or events to be generated
just to manage the iommu while we are idle.

Change-Id: I2e8740bee8c25c93bddc51a90a3370d151aaf558
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
(cherry picked from commit 1a3279ee70f72d67c5b259573096a9953257a9b5)
Signed-off-by: Harsh Vardhan Dwivedi <hdwivedi@codeaurora.org>
Merge "msm: kgsl: use the same logic in adreno_idle and adreno_isidle"
Merge "msm: kgsl: use kgsl_mmu_device_setstate() whenever the gpu is idle"
Merge "ASoC: wcd9304: Fix dce and sta wait time"
ALSA: usb-audio: Fix the mixer control range limiting issue

- mixer_ctl_set() function is limiting the volume level
  to particular range. This results in incorrect initial
  volume setting for that device.
- In USB mixer while calculating the dBmin/dBmax values
  resolution factor is hardcoded to 256 which results in
  populating the wrong values for dBmin/dBmax.
- Fix is to use appropriate resolution factor while
  calculating the dBmin/dBmax values.

CRs-Fixed: 515012
Change-Id: I502355af66f850bb65380c27333c3341fa43a947
Signed-off-by: Deepa Madiregama <dmadireg@codeaurora.org>
Merge "ALSA: usb-audio: Fix the mixer control range limiting issue"
Merge remote-tracking branch 'caf/jb_2.6' into update
d2 et al.: disable OABI compat

Commit fefc65c201fc50bd4f22602292bbf48c8df23450 removed the requirement
for OABI compatibility back in April due to TLB crashes, but we still
have it on.

There is no reason I can think of to leave this on.

Change-Id: Idec3a3f4a931db601ad469e892b30eb18be4deed
prima 3.2.3.172

Change-Id: Ic8e7d319f76430ad5b807eb2a5264d2c66c86359
msm: mdm: Changes to implement notifications from the mdm-driver

mdm-driver can now send notifications.

Change-Id: Idacf0a1d26a40ecd277407240f797ede72fb5b31
Signed-off-by: Ameya Thakur <ameyat@codeaurora.org>
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
msm: audio: Notify QSC power on and off to LPASS

Register callback functions to receive QSC power on/off status
and send the APR messages to LPASS. So LPASS will not poll QSC
if QSC is in power down state

Change-Id: Ia4fad40b9e2cd554b8cbd13e2cba2e398995050c
Signed-off-by: Helen Zeng <xiaoyunz@codeaurora.org>
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>

Conflicts:

	sound/soc/msm/qdsp6/q6voice.c

Signed-off-by: Ameya Thakur <ameyat@codeaurora.org>
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
sysctl: add cold_boot sysctl entry

Add a cold_boot parameter which supplements the boot
reason sysctl entry with information about whether
the system was booted from cold or warm state

CRs-Fixed: 461256
Change-Id: I2bc5d80c8f26eb9e9dbb4b34960d991a51a224e4
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
mfd: pm8xxx: implement cold_boot sysctl parameter

Read PON_CNTRL_6 bit 7 to check whether a MSM WD has
occured during reset. If this bit is set it is used
as an indicator that a warm boot has occured.

CRs-Fixed: 461256
Change-Id: I69c527aa6636660aa3fab032c1bb5dc5eb4ecd8c
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
msm8930 sglte: Add subsys name for external QSC.

The QSC modem on 8930 SGLTE devices now has a name associated
with it in the mdm driver

Change-Id: I5f1093fbdd43de6284781e26bd07db795b0a0205
Signed-off-by: Ameya Thakur <ameyat@codeaurora.org>
Signed-off-by: Rajkumar Raghupathy <raghup@codeaurora.org>
msm: pil-q6v4: Change modem shutdown sequence

Existed sequence:
	axi_bus_halt(modem)
	pas_shutdown(modem)
	axi_bus_halt(modem_fw)
	pas_shutdown(modem_fw)

With the above sequence some outstanding transactions from Modem FW
when the clock reset happens, will cause a bus hang leading to a system
reset.

Do bus axi port halt for modem SW and modem FW together before making TZ
calls for either modem SW/FW reset. New sequence would be as below.

New sequence:
	axi_bus_halt(modem)
	axi_bus_halt(modem_fw)
	pas_shutdown(modem)
	pas_shutdown(modem_fw)

CRs-Fixed: 504698
Change-Id: I40ad1116f96b0d77ee3b6be29f3295cc7ae171a1
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
htb: fix sign extension bug

[ Upstream commit cbd375567f7e4811b1c721f75ec519828ac6583f ]

When userspace passes a large priority value
the assignment of the unsigned value hopt->prio
to  signed int cl->prio causes cl->prio to become negative and the
comparison is with TC_HTB_NUMPRIO is always false.

The result is that HTB crashes by referencing outside
the array when processing packets. With this patch the large value
wraps around like other values outside the normal range.

See: https://bugzilla.kernel.org/show_bug.cgi?id=60669

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>