Merge "msm: Camera: Return proper value for msm_camera_qup_i2c_txdata()." into LNX.LA.3.5.2.2.1_rb1
Merge "regulator: mem-acc-regulator: Add a driver to control the MEM ACC" into LNX.LA.3.5.2.2.1_rb1
Merge "msm: socinfo: Introduce soc string" into LNX.LA.3.5.2.2.1_rb1
Merge "power: qpnp-bms: do not adjust when shutdown soc is being applied" into LNX.LA.3.5.2.2.1_rb1
Merge "devfreq: governor_cpubw_hwmon: Fix use of decay_rate" into LNX.LA.3.5.2.2.1_rb1
Merge changes I0a1831b2,I6863ba7a into LNX.LA.3.5.2.2.1_rb1

* changes:
  cma: Drop the right mutex
  cma: Make locking finer grained
power: qpnp-bms: disable interrupts at probe

The ocv and cc threshold interrupt are required when the battery is
FULL. Disable them at probe time and enable them once the battery is
reported full.

Change-Id: I75bc0b9128f7a8552380ba184d8a72e54159c01d
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
power: qpnp-bms: increase resolution of temperature lookups

Currently, the BMS driver rounds to the nearest degree when doing
table lookups on FCC, rbatt, and OCV. This is done with no
interpolation.

This can be harmful because in low temperatures, a change in 1/10th of a
degree C can cause very big swings in UUC due to the rbatt lookup
crossing a threshold. There has been cases seen in -20 degC testing
where when SoC goes from -3.9C to -4C, a shift of 80 mOhms of rbatt was
observed. This increased the UUC by 8% and caused large SoC swings.

Fix this by interpolating between the temperature ranges more smoothly.

Change-Id: I21ba32fd56b802c5a68f5c193f0904e445b6a798
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
power: qpnp-bms: use consistent IAVG for raw SOC calculation

Currently the BMS uses the instantaneous current for the raw SOC
calculation. However, this current can be very high because of the boot
tiime power draw. This can bias the UUC to unreasonably levels (100% of
the battery when at cold temperatures) and cause the saved shutdown SOC
to be needlessly discarded.

Use the more realistic IAVG of 250 mA when doing this initial raw SOC
calculation as well in other places where iavg is being reset to avoid
skewing the results. Also, do not save the percent UUC when doing the raw
SOC calculation. Rather, use the loaded shutdown IAVG if there is one.

Change-Id: I426b824a50568b01bae442a3154e7c68c42409f8
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
power: qpnp-bms: always release output locks in bms driver

If a SPMI read error occurs, there can be a situation where the
BMS_HOLD_OREG bit is not set and the bms param lock is never released.
This can cause deadlocks and battery SoC to never move. Fix this by
releasing the locks after handling an error.

Change-Id: I880b8e1ed2ff1ec3ce701f1e9922c9aac353766a
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
power: qpnp-bms: fix coulomb counter selection

There is a bug in the BMS code right now where reading the coulomb
counter actually reads the shadow coulomb counter and vice versa. Fix
this by correctly specifying the coulomb counter to be read.

Change-Id: Ica703d1e426e595e9ff6cd9fc45bade743740238
Signed-off-by: Xiaozhe Shi <xiaozhes@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 dapm_set_pin and dapm_force_enable_pin function
accesses the dirty list, protect it using the dapm mutex.

CRs-Fixed: 637323
Change-Id: I8c265072083e142c0858b6cc7a983d07e7d75af0
Signed-off-by: Aviral Gupta <aviralg@codeaurora.org>
msm: display: reduce display commit prepare waiting time

Unblock overlay_set, prepare and buffer sync ioctls when
commit thread finishes hardware programming.
Use wait_for_kickoff nstead of pan_idle for these ioctls.

Change-Id: Iefb6cbc390d2130926fdcb93688b4d92bfb26937
Signed-off-by: Ken Zhang <kenz@codeaurora.org>
Signed-off-by: Neti Ravi Kumar <ravineti@codeaurora.org>
CRs-Fixed: 647081
Merge "ASoC: msm: fix the target crash due to the NULL pointer dereference"
Merge "qseecom: update cumulative_mode and timer properly."
msm: camera: sensor: Update CCI WR comamnd buffer size to 11 bytes

I2C command length is of 11 bytes, it includes 10 bytes of data and
one byte of WR command. Use 11 bytes char array to create command.

Change-Id: Idf330fef6b8da79c6b7f5a2839d88a68e10a96f9
Signed-off-by: Rajesh Bondugula <rajeshb@codeaurora.org>
cfg80211: Add support for QoS mapping

This allows QoS mapping from external networks to be implemented as
defined in IEEE Std 802.11-2012, 10.24.9. APs can use this to advertise
DSCP ranges and exceptions for mapping frames to a specific UP over
Wi-Fi.

The payload of the QoS Map Set element (IEEE Std 802.11-2012, 8.4.2.97)
is sent to the driver through the new NL80211_ATTR_QOS_MAP attribute to
configure the local behavior either on the AP (based on local
configuration) or on a station (based on information received from the
AP).

CRs-fixed: 650927
Change-Id: I72ab05c7aa98528b05f6278df192cc25358c2666
Signed-off-by: Kyeyoon Park <kyeyoonp@qca.qualcomm.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: fa9ffc745610f31c6bc136d5a6a1782e00870e72
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
[ppotte@codeaurora.org: manually solved merge conflicts]
Signed-off-by: Pradeep Reddy POTTETI <ppotte@codeaurora.org>
cfg80211: Allow BSS hint to be provided for connect

This clarifies the expected driver behavior on the older
NL80211_ATTR_MAC and NL80211_ATTR_WIPHY_FREQ attributes and adds a new
set of similar attributes with _HINT postfix to enable use of a
recommendation of the initial BSS to choose. This can be helpful for
some drivers that can avoid an additional full scan on connection
request if the information is provided to them (user space tools like
wpa_supplicant already has that information available based on earlier
scans).

In addition, this can be used to get more expected behavior for cases
where a specific BSS should be picked first based on operations like
Interworking network selection or WPS. These cases were already easily
addressed with drivers that leave BSS selection to user space, but there
was no convenient way to do this with drivers that take care of BSS
selection internally without using the NL80211_ATTR_MAC which is not
really desired since it is needed for other purposes to force the
association to remain with the same BSS.

CRs-Fixed: 650927
Change-Id: I882d4b94b90f270907df0e53c360d69f3c984fb8
Signed-off-by: Jouni Malinen <j@w1.fi>
[add const, fix policy]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: 1df4a51082df6e5b0b8eb70df81885b9b4c9e6ec
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
Signed-off-by: Pradeep Reddy POTTETI <ppotte@codeaurora.org>
cfg80211: Advertise maximum associated STAs in AP mode

This allows drivers to advertise the maximum number of associated
stations they support in AP mode (including P2P GO). User space
applications can use this for cleaner way of handling the limit (e.g.,
hostapd rejecting IEEE 802.11 authentication without manual
configuration of the limit) or to figure out what type of use cases can
be executed with multiple devices before trying and failing.

CRs-Fixed: 650927
Change-Id: I73a078800d8da28c9699cc02e7d4142691107811
Signed-off-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-commit: b43504cf75b8b8773ee70c90bcd691282e151b9a
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git
[ppotte@codeaurora.org: manually solved merge conflicts]
Signed-off-by: Pradeep Reddy POTTETI <ppotte@codeaurora.org>
cfg80211: Pass TDLS peer capability information in tdls_mgmt

While framing the TDLS Setup Confirmation frame, the driver needs to
know if the TDLS peer is VHT/HT/WMM capable and thus shall construct
the VHT/HT operation / WMM parameter elements accordingly. Supplicant
determines if the TDLS peer is VHT/HT/WMM capable based on the
presence of the respective IEs in the received TDLS Setup Response frame.

The host driver should not need to parse the received TDLS Response
frame and thus, should be able to rely on the supplicant to indicate
the capability of the peer through additional flags while transmitting
the TDLS Setup Confirmation frame through tdls_mgmt operations.

CRs-Fixed: 650927
Change-Id: I6e37ff671aa39b27cd22fa8af0b6a1a3b33a64db
[ppotte@codeaurora.org: manually solved merge conflicts]
Signed-off-by: Pradeep Reddy POTTETI <ppotte@codeaurora.org>