SoC: msm: Set soft step values to 0 to avoid noise

The abrupt steps in the curve are causing the noise. To avoid noise
smaller step size are recommended.

CRs-fixed: 439933
Change-Id: I34681af412e4f7ba8a99ce0f08f5ee1fa69186ff
Signed-off-by: Fred Oh <fred@codeaurora.org>
wcnss: Log CCPU registers in reset interrupt API

Reset interrupt is sent to Riva when host drivers fail to communicate
with Riva over SMD. So logging these CCPU registers helps to know the
failure reason at Riva.

Change-Id: Icccf6a5b0644fd75137602cc96b25dc8d392260a
CRs-Fixed: 418813
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
power: pm8921-charger: get rid of using LPM

The LPM is causing a lot of regression on various test cases
1. Writes to charger have become complex
2. There is uncertainty about whether battery insertion/removal could be
detected reliably.

LPM was introduced to prevent lockups from happening when the charger
was running in hw based clock switching while it was suspended. UVLO
lockups were not seen if the charger was running from 19.2Mhz.

Instead activate LPM mode only while the system is suspended and always
force 19.2Mhz when not suspended. This way we avoid the complexities
with writes, can detect battery insertion/removal as long as the system
is not suspended and more importantly fix the UVLO issue since we will
never be running in hw clk switching mode.

Change-Id: I94510311b503c21ec659a96982010435abdbcfaf
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
power: pm8921-charger: Make charger removal detection workaround optional

On some platforms such as MPQ8064 the charger removal detection
workarounds - reverse boost fix and OVP FET stuck do not work
as expected as the SMBC module is disconnected from USBout. On
these targets the USB interface is not used for charging but merely
to indicate the USB driver of the insertion/removal.

Add a platform data variable to make this optional and enable
the same for MPQ8064.

Change-Id: I3fca1b357f8fc280483302f72ffbc61fb50109a7
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
power: pm8921-bms: fix the mutex usage

get_reading() should be protected by the ocv mutex not the bms output
mutex.

Change-Id: I24eea963611a8df87ce350120d318319cd1a6c3a
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
power: pm8921-bms: optimize finding ocv

The current code returns if the OCV is within 1% of the expected
percent charge. This is suboptimal and instead it should try to
be find an OCV that results exactly in the desired percent charge.

Change-Id: If0918d0fb386719487c2e0dfa24c255b3c32c5dc
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
power: pm8921-bms: reset coulomb counter when faking high ocv

When charging is complete, BMS will fake a high OCV in order to appear
at 100%. Instead of tracking the cc value at EOC and using that to
offset further CC reads reset the coulomb counter in the h/w itself.

Change-Id: I7e4cb7a057d19c43aa0f949411b272a9e02d7cfd
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
msm: display: Add DSI clock control for MDP GDHS power collapse

Enable DSI clock and regulator before enabling/disabling power collapse
for MDP GDHS.

(cherry picked from commit ad3200279e62eff01fd1bb9136cc9c0d11e10380)

(cherry picked from commit 58c5992c710df379e26bb210e00c74da501db9d2)

Change-Id: I76b91260c61abf214e688c0dea6989ed2cfa3801
Signed-off-by: Ravishangar Kalyanam <rkalya@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
Signed-off-by: Ram Kumar Chakravarthy Chebathini <rcheba@codeaurora.org>

Conflicts:

	arch/arm/mach-msm/board-8064-regulator.c

Signed-off-by: Dhivya Subramanian <dthiru@codeaurora.org>
msm: kgsl: Check the current interrupt status before power operations

Sometimes the core will go idle before the interrupt can be handled on
the GPU. If that happens then we could go to a lower power state before
cleaning up the pending interrupt and various entities that might be
waiting for it. Consider the current interrupt status when checking
for idle.

CRS-fixed: 449813
Change-Id: Ic0dedbadfd2d40e4411cf3b05e1eb4c4eecf7841
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Resolve a potential race in the interrupt handler

In the GPU interrupt handler we attempt to clear the ts_cmp_enable
for the active context so that future interrupts are skipped until
someone needs one again. If for some reason the interrupt handler
is delayed then there is a possiblity that the "current" context in
the GPU isn't the one that fired the interrupt. In that case we
could be accidently clearing a ts_cmp_enable for a context that
needs it. Instead of clearing in the interrupt handler clear it
from the GPU so we can be sure we got the right context.

As a bonus pushing this logic to the GPU side lets us get rid of
some extra register reads/writes in the interrupt handlers.

Change-Id: Ic0dedbadbf350f7c4866092fa0686f9b42f3cd33
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: kgsl: Add event tracepoints

Add tracepoints for tracking the lifespan of GPU events.

Change-Id: Ic0dedbadf99b1efcb650608c6ac664d3c4ddafd5
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
msm: camera: Fix the composite stats buffer handling.

Currently we configure composite stats in HFR mode. In composite stats
mode, the stats buffers are not getting dequeued and dispatched properly.
Hence the stats are not processed properly in HFR mode, resulting in dark
preview in camcorder HFR mode. Fix this by correcting the buffer handling
logic in case of composite stats.

CRs-Fixed: 452197
Change-Id: I98be1160001deea72d0fa31e0e804d523fd72c20
Signed-off-by: Ashwini Rao <ashwinik@codeaurora.org>
Signed-off-by: Kiran Kumar H N <hurlisal@codeaurora.org>
wireless: add VHT (802.11ac) definitions

Add the VHT definitions to be used by drivers supporting it.

Change-Id: Ia301cf72940cef19767f4f485a09c9afc12ae514
CRs-fixed: 452921

Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
cfg80211: allow advertising VHT capabilities

Allow drivers to advertise their VHT capabilities
and export them to userspace via nl80211.

Change-Id: I2d2825a09dfddccca1bd3edacd7fc382d765bea5
CRs-fixed: 452921

Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
mac80211: include VHT capability IE in probe requests

Insert the VHT capability IE into probe requests.

Change-Id: I75620090969b46701f1c760baf9c6559a4a1ac2c
CRs-fixed: 452921

Signed-off-by: Mahesh Palivela <maheshp@posedge.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
diag: Bring Diag up to date

Diag on the A-Family mainline is out of date. This change brings
the diag code up to date.

This includes reducing the error message frequency and the latest
msg SSIDs, log codes and event IDs.

Change-Id: Ibfce8ea52e25044df32bdff419d457ad296c6fc1
CRs-Fixed: 455623
Signed-off-by: Ravi Aravamudhan <aravamud@codeaurora.org>
msm: wfd: Correct logic to unmap mdp buffers

Currently unmapping of the mdp buffers from iommu is not
happening for non-secure mode. Initial value of the
flag that decides unmapping is changed to fix the issue.

Change-Id: I34201780f3b454f368e401792a050247e58eb185
Signed-off-by: Rajeshwar Kurapaty <rkurapat@codeaurora.org>
mobicore: New branch incorporating QC code review suggestions.

Solved various naming issues, removed comments.
Many of the changes already present in master.

Signed-off-by: Lukas Hänel <lukas.haenel@gi-de.com>
Change-Id: I7c068154e5af5ae40dc2675afb67a5f6835d9d05
[hnamgund@codeaurora: align platform.h with other branches,
 reformat commit text, resolve trivial merge conflicts]
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
Acked-by: Tony Hamilton <tonyh@qti.qualcomm.com>
mobicore: MobiCore 1.2 kernel module Changes to MC11

Split up of /dev/mobicore into daemon and TLC part /dev/mobicore-user.
Refactored memory management to use locking and refcounting.
Use new data structures for managing world shared memory.
Split up functionality into different source files.
Shorter names for various identifiers.

Signed-off-by: Lukas Hänel <lukas.haenel@gi-de.com>
Change-Id: I6e239c061403500b74707feca31785237158f93b
[hnamgund@codeaurora.org: Drop executable permission for arm.h,
 drop changes to platform.h to align with other branches,
 reformat commit text]
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
Acked-by: Tony Hamilton <tonyh@qti.qualcomm.com>
mobicore: t-base-200 Engineering Release

 - Improve the smc work by not using work_on_cpu anymore
which in later linux versions spawns a new thread.
 - Unmap memory from TLC when freeing.
 - Enable mapping of contigous buffers to trustlets.
 - Logging set up by th IOCTL.
 - Compliant with the 3.4 Linux Kernel Version.

Change-Id: Ied8f024c4dd7e101b23e3ba842fcc47f9ab583fe
Signed-off-by: Oana Medvesan <medvesan.oana@gmail.com>
[hnamgund@codeaurora.org: Modify mobicore_kernelapi/main.c for 3.4
kernel compatibility, reformat commit text]
Signed-off-by: Hariprasad Dhalinarasimha <hnamgund@codeaurora.org>
Acked-by: Tony Hamilton <tonyh@qti.qualcomm.com>