Commit graph

587756 commits

Author SHA1 Message Date
Linux Build Service Account
85cd9a2afb Merge "power: smb-lib: update USBIN_V_VOTER usage" 2017-04-05 04:05:39 -07:00
Linux Build Service Account
0645e1acd6 Merge "msm: pcie: support PCIe MSI QGIC with stage 1 SMMU enabled" 2017-04-05 04:05:37 -07:00
Linux Build Service Account
d7d5fb015b Merge "Revert "defconfig: msm: Enable RCU_STALL_WATCHDOG_BITE flag"" 2017-04-05 04:05:37 -07:00
Linux Build Service Account
078448a790 Merge "Input: stm: optimize the laser sensor driver" 2017-04-05 04:05:36 -07:00
Linux Build Service Account
e81f37a9e5 Merge "ARM: dts: msm: Update camera clock sources for sdm630" 2017-04-05 04:05:35 -07:00
Linux Build Service Account
61aa6bdf98 Merge "ARM: dts: msm: Add flash and OIS node to camera sensor mtp for msm8998" 2017-04-05 04:05:34 -07:00
Lynus Vaz
341934ba38 msm: kgsl: Use legacy PM4 check instead of adreno version
Check for legacy PM4 commands instead of adreno version to calculate
ringbuffer space for PM4 commands that write to memory.

Change-Id: I5d1d4cfbc70bc73ddee9ee752de24aae154a04dc
Signed-off-by: Lynus Vaz <lvaz@codeaurora.org>
2017-04-05 03:07:24 -07:00
Hamad Kadmany
a499165e79 wil6210: add sysfs file for enable/disable fst link loss
The new "fst_link_loss" sysfs can be used to enable/disable the fst
link loss behavior for specific connection.

Change-Id: I7afcf86a575ca3add581c8823a3d5567483abcb0
Signed-off-by: Hamad Kadmany <hkadmany@codeaurora.org>
2017-04-05 12:49:26 +03:00
Sarada Prasanna Garnayak
d5782299b7 ARM: dts: msm: add regulators and clk in icnss device node for sdm630
During recovery, there are cases where in WLAN driver running on
APPS can access WLAN copy engine register causing exceptions
because of WLAN hardware in reset state.

Add voltage regulator and clk in icnss device node to vote for WLAN
hardware resources by the icnss platform driver during WLAN recovery.

CRs-Fixed: 2029173
Change-Id: I00bbad40ee152c8dac187ff1f541e34b254589cb
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
2017-04-05 01:57:47 -07:00
Sarada Prasanna Garnayak
66656b0732 ARM: dts: msm: add regulators and clk in icnss device node for sdm660
During recovery, there are cases where in WLAN driver running on
APPS can access WLAN copy engine register causing exceptions
because of WLAN hardware in reset state.

Add voltage regulator and clk in icnss device node to vote for WLAN
hardware resources by the icnss platform driver during WLAN recovery.

CRs-Fixed: 2029102
Change-Id: Iba785acc391fb56ea068199598ddc14d20bb3481
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
2017-04-05 01:57:43 -07:00
Maya Erez
52174c7752 wil6210: prevent access to 11AD device if resume fails
In case wil6210 resume fails, wil6210 suspend function will try
to access the suspended device in the next kernel suspend.
To prevent that, add wil_status_suspended flag to indicate if the
device is already suspended and clear it only if the resume succeeds.

Change-Id: I548e5b516cfa62389ce5f6cafcf1568206f7c2a9
Signed-off-by: Maya Erez <merez@codeaurora.org>
2017-04-05 11:26:45 +03:00
Mohit Aggarwal
8901694f22 diag: Set context properly while sending command responses
Currently, setting of context is not proper while sending
command responses due to which modem command response
buffer is getting corrupted leading to modem qshrink4
qdb file corruption. This patch fixes the issue by
setting the context properly.

CRs-Fixed: 2026664
Change-Id: I4bd2c23feaaf8a75a5a256d28377878519b507c6
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
2017-04-05 12:40:05 +05:30
Neeraj Soni
adc03ee05b crypto: msm: Use appropriate logging function
Dynamic debug can be used to get the logs

Change-Id: I6510da111019022149190fd753a5da1cc816fffa
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
2017-04-05 11:57:57 +05:30
Prasad Malisetty
240cf80a7e mhi: core: Enable mhi_dev_net interface channels
Enable 46, 47 channels for mhi_dev_net interface.
mhi_dev_net client uses read and write channels to
communicate mhi host rmnet interface over PCIe link.

CRs-Fixed: 2029099
Change-Id: Ifdda4b1a139751bd2b36143d9125068f34fec9e5
Signed-off-by: Prasad Malisetty <prasadm@codeaurora.org>
2017-04-05 11:34:10 +05:30
Tharun Kumar Merugu
f31aa2780c msm: ADSPRPC: Unmap remote heap buffer only for ADSP SSR
Unmap remote heap buffer only for ADSP SSR

Change-Id: I9abff20cfdcc4588a3a377e73d38d3ea91316d25
Acked-by: Himateja Reddy <hmreddy@qti.qualcomm.com>
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
2017-04-04 22:04:41 -07:00
Ashay Jaiswal
0b6793543b qcom: smb1351: update CHARGING_ENABLE reporting logic
In case of parallel charging mode "parallel_charger_suspended"
variable tracks the charging enable state, update CHARGING_ENABLE
reporting to use the same.

CRs-Fixed: 2014572
Change-Id: Ib7246f407ad103343b7587b9de3ac938fb63767d
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2017-04-05 10:19:49 +05:30
Ashay Jaiswal
eb367740c8 qcom: smb2: disable parallel in restricted/thermal conditions
Add voting to disable parallel charger in case of restricted
charging and when system temperature level changes from normal.
Parallel charger gets re-enabled once thermal condition/FCC
restrictions are removed.

CRs-Fixed: 2014572
Change-Id: Ic26b3d93f2f3d582a2eb3c7b9ea0d27bbad24a50
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2017-04-05 10:19:49 +05:30
Abhijeet Dharmapurikar
347cdf228a qcom: battery: update parallel algorithm for ICL change
Update the parallel algorithm for ICL change request.
Following steps are performed for every ICL change:
- disable parallel charger using ICL_CHANGE_VOTER
- update the new ICL and re-run AICL.
- re-enable parallel charger by removing vote of
  ICL_CHANGE_VOTER.

While at it, update the 'smblib_get_prop_usb_online'
function to use voter library's locked API to get
the usb_icl_vote, this fixes the lockup that happens
when charging is enabled/disabled from usb_icl_votable's
callback function.

CRs-Fixed: 2014572
Change-Id: I7deb6a50d67471ab1aa5e1db6fff880574b4bafb
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-04-05 10:19:20 +05:30
Abhijeet Dharmapurikar
69d321dcee qcom: battery: remove ICL_REDUCTION support
Make battery library to directly update the split current
of the main charger via power_supply framework's set_property
API using CURRENT_MAX property. ICL_REDUCTION property
is no longer required.

Note that we are not doing initial ICL vote for USBIN USBIN,
instead when time comes to split aicl, we will read the input
current limit and if nothing is set, check what the hw determined
as the max limit and use that.

For a PD charger case where the apsd result will be unknown,
the current limit is expected to be set by the time aicl settled is
called. The 30 second delaying of parallel enabling, should give
PD engine ample time to set the current limits.

While at it clean up the way settled current change is tracked. Create
a variable that specifically indicates the total settled current seen
last time settled current was adjusted. This makes compare to an updated
settled current value easy.

CRs-Fixed: 2014572
Change-Id: I040b65e6380f2c12350ea44bf32e6981ff126f18
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-04-05 10:18:49 +05:30
Ashay Jaiswal
17d9f0383d power_supply: add HW_CURRENT_MAX power_supply property
Add support for HW_CURRENT_MAX property which returns maximum
input current that can be set for an adapter. This property will
be specifically used by parallel charger to cast an initial ICL
vote.

CRs-Fixed: 2014572
Change-Id: I49e80e6b25f40791d9035bc1567fdf881914b1e8
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-04-05 10:02:54 +05:30
Ashay Jaiswal
7ddef0d5e4 qpnp: smb-lib: move usb_icl_votable to battery library
Move usb_icl_votable creation and it's callback in the
battery.c file, in preparation for an upcoming change where
usb_icl_votable callback will be able to
disable parallel charger when a low input current
request is set.

The new callback uses CURRENT_MAX property to be set on main
psy to set the ICL limit of primary charger.

The limit setting code in main charger path where the votable
call resides currently relies a lot on client being present or not.
Since the votable is being moved away, it won't have information
about the client. So use the current parameter of INT_MAX to
indicate no clients present.

Also it could be that main psy is not instantiated by the time first
icl vote comes in. Ensure that we rerun_election on usb_icl_votable
the instant main psy is seen.

CRs-Fixed: 2014572
Change-Id: Ie449af086ed9218b40ea83158b69e8f8e73edda3
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-04-05 10:02:46 +05:30
Ashay Jaiswal
ef45c30bc8 qcom: smb2: disable h/w autonomous parallel control
The charger driver ensures that parallel charging remains
disabled as long as AICL is below threshole (1400mA) using
it's software voting mechanism(USBIN_I_VOTER), thus disable
hardware's autonomous control of input current based parallel
charging.

CRs-Fixed: 2014572
Change-Id: Ie991e0c1d16d63b6def6fb3379019114d20d60f7
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-04-05 10:02:39 +05:30
Ashay Jaiswal
f521128115 qcom: smb-lib: add delay for parallel enable
Currently, the driver enables parallel charger as soon
as a favorable charger is seen. This causes many, unnecessary
splits of AICL results as AICL runs for the first time. Besides
the detection logic could further update charger type and rerun
AICL.

Its best to simply delay enabling parallel charger for 30 seconds.
This ensures that type detection and its AICL run to completion and
parallel charging starts with a stable AICL result.

To realize this
- implement a workqueue which will be scheduled/cancelled 30 seconds
  later when vbus plugin interrupt happens.
- The workqueue signifies that 30 seconds have elapsed and parallel
  charging should be enabled by PL_DELAY_VOTER.
- remove PL_DELAY_HDVP_VOTER since PL_DELAY_VOTER will
  ensure parallel gets enabled after 30 seconds of insertion.
- unvote from PL_DELAY_VOTER only when the typeC removal event happens.
  A PR_SWAP during a sink session will keep the PL_DELAY_VOTER's vote
  enabled, we expect CHG_STATE_VOTER to disable parallel since device will
  be supplying VBUS and not charging the battery. This also means that
  when another PR_SWAP happens and the device starts operating in sink mode
  again, PL_DELAY_VOTER's vote will remain enabled and parallel charging
  would begin when other conditions become favorable. IOW PL_DELAY_VOTER
  tracks 30 second after physical insertion and remains unaffected by
  PR_SWAPs.

CRs-Fixed: 2014572
Change-Id: Ibe10768e61c6d2661bc8946f7f6b9be06f0c28e6
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-04-05 10:02:29 +05:30
Ashay Jaiswal
38939b5e92 power: smb-lib: update USBIN_V_VOTER usage
The current code enables parallel charging if a high voltage
charger is seen (QC or PD) or a high current charger is seen.

This means that parallel charger could remain enabled when PD
transitions its voltage even though it has reduced the current
to 500mA. It is desirable to disable parallel charging during
such voltage transition.

So prepare for this change by first ensuring that only a QC
charger votes for USBIN_V_VOTER. The PD charger, even while
operating at higher voltages will need to depend on USBIN_I_VOTER,
just like a simple DCP charger, to enable parallel charger.

CRs-Fixed: 2014572
Change-Id: I03dfcff44b30b06918ebf176043873fb141f485f
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
2017-04-05 10:01:08 +05:30
Subbaraman Narayanamurthy
8f1a482fd2 power: qpnp-fg-gen3: Add support to configure ESR pulse thresholds
ESR pulse qualification threshold and measurement current should
get set properly without which ESR pulses can fire frequently
causing frequent wakeups. Add support to configure them. Use the
default values as per the hardware recommendation.

Change-Id: I160b2171c46df483c7fa4da2ce23009d99c6dcff
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-04-04 21:17:21 -07:00
Linux Build Service Account
26db194916 Merge "defconfig: msm: Enable CONFIG_UID_CPUTIME flag" 2017-04-04 20:07:31 -07:00
Linux Build Service Account
617c68c493 Merge "mmc: core: prefer SDR50 mode over DDR50 for SD card" 2017-04-04 20:07:31 -07:00
Linux Build Service Account
b742552ee2 Merge "ASoC: msm: qdsp6v2: Add support for 7 channel mapping" 2017-04-04 20:07:30 -07:00
Linux Build Service Account
0136ee2462 Merge "mmc: core: Increase the runtime PM reference count in try_claim_host" 2017-04-04 20:07:29 -07:00
Linux Build Service Account
7ee506fbe9 Merge "msm: kgsl: Remove incorrect check to cap AB vote to IB vote" 2017-04-04 20:07:28 -07:00
Linux Build Service Account
23b57af0a3 Merge "msm: gsi: continue probe on ipc log failure" 2017-04-04 20:07:27 -07:00
Linux Build Service Account
c0dabb7776 Merge "msm: kgsl: Disable memory retention for core clock before entering SLUMBER" 2017-04-04 20:07:27 -07:00
Linux Build Service Account
8c6ab57348 Merge "mmc: core: Remove unused variable cached_ext_csd" 2017-04-04 20:07:26 -07:00
Linux Build Service Account
54b3c86290 Merge "ARM: dts: msm: Add dt support for platforms with audio over USBC" 2017-04-04 20:07:25 -07:00
Linux Build Service Account
8df5bc2d7e Merge "block: Make del_gendisk() safer for disks without queues" 2017-04-04 20:07:24 -07:00
Linux Build Service Account
0802e8d62f Merge "scsi: ufs: scale up the gear in 2 steps" 2017-04-04 20:07:23 -07:00
Linux Build Service Account
c43712c4db Merge "drivers/base: cpu: Add node for core control isolation" 2017-04-04 20:07:22 -07:00
Linux Build Service Account
fb11ce47de Merge "ASoC: msm: qdsp6v2: add route for TERT_TDM_RX_4 playback" 2017-04-04 20:07:21 -07:00
Yahui Wang
427d216d5c ARM: dts: msm: modify panel initial commands for SDM630 PM660A QRD
Sometimes panel would become not stable when doing stress testing,
so modify some panel initial commands according to panel vendor.

Change-Id: Id2dd9fbd75501693c0ca03c8b7ec26ad9e51b35c
Signed-off-by: Yahui Wang <yahuiw@codeaurora.org>
2017-04-04 19:51:02 -07:00
Tony Truong
3fa2736a23 msm: pcie: update mask and linkdown check in PCIe read/write API
The current check for linkdown does not suffice if the default
value of that register is 0xffffffff. PCIe bus driver needs to
also read the device/vendor ID of the client to confirm if it
is really a linkdown. Update the mask method to be compatible
with 64-bit architecture.

Change-Id: Ibe51dff50ff010260a750d73498333ee830fca2c
Signed-off-by: Tony Truong <truong@codeaurora.org>
2017-04-04 17:58:23 -07:00
Karthikeyan Mani
53572b845a ASoC: codecs: Fix mbhc data NULL pointer dereferencing
Initialize completion structure in wcd_mbhc_initialize
and wcd_mbhc_init to handle irq handlers getting called
before the completion structure is initialized and ready
for use.

CRs-fixed: 2020227
Change-Id: Ibc7a5974adfe803c5b9892986165e2e1e3151fc7
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2017-04-04 17:48:05 -07:00
Tony Truong
23764aabce msm: pcie: support PCIe MSI QGIC with stage 1 SMMU enabled
When Stage 1 SMMU is enabled, the QGIC doorbell address needs to
be mapped or else there will be a translation fault when an endpoint
tries to trigger an interrupt via MSI. PCIe host driver will map
this address on behalf of the client.

Change-Id: I7fdbe62daeb5dbecc459e4d9bc7832785f5b9fb7
Signed-off-by: Tony Truong <truong@codeaurora.org>
2017-04-04 17:26:19 -07:00
Tony Truong
8f301e1bd1 msm: pcie: expand PCIe boot option
PCIe clients and endpoints have different boot
sequence. Expand the boot options in PCIe bus
driver to meet their requirements.

Change-Id: Ia244fd402b784e511eefb550d9814d3b708879fd
Signed-off-by: Tony Truong <truong@codeaurora.org>
2017-04-04 16:28:08 -07:00
Stephen Boyd
670225d620 security: pfe: Remove __exit annotation to fix section mismatch
pfk_ext4_deinit() is called from init code and we throw away
__exit marked code when modules are built-in. Remove the __exit
markings here so that we can always call this function even from
__init code. Similarly for pfk_ecryptfs_deinit().

Change-Id: I80a3304d84cdf18772879efe6c4a955d873b89c4
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2017-04-04 16:25:57 -07:00
Subbaraman Narayanamurthy
0356676d7d qcom: qpnp-fg-gen3: Reconfigure profile parameters upon battery hotswap
Currently, we configure battery profile parameters during bootup
and they're not configured again during battery hotswap. Fix
this by configuring those parameters after getting it from the
device tree.

Change-Id: I43c5c9cdc6dfc12751ae0a67faee59aacf4326dc
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-04-04 16:13:19 -07:00
Honghao Liu
6b1ec98d8e ASoC: msm: support up to 8 channel capture on MM1
Update Multimedia1 FE to support up to 8 channel audio capture.

CRs-fixed: 2028896
Change-Id: I838ecd690fcdeef411d35a5facbe9c40a76b68c3
Signed-off-by: Honghao Liu <honghaol@codeaurora.org>
2017-04-04 15:00:24 -07:00
Honghao Liu
8441629a01 ASoC: msm: add support for TERT_TDM_RX_4 BE
Add TERT_TDM_RX_4 BE DAI link into automotive sound card
DAI link array. Add kcontrols for channel and bit format
configuration for TERT_TDM_RX_4 BE.

CRs-fixed: 2018097
Change-Id: I1fef2f6a799aeeee0752f3ae2462dcd26a1d66c9
Signed-off-by: Honghao Liu <honghaol@codeaurora.org>
2017-04-04 16:49:39 -04:00
Honghao Liu
bdee9f8749 ARM: dts: msm: support TERT_TDM_RX_4 DAI on msm8996 adp/cdp
Add TERT_TDM_RX_4 DAI in the TDM TERT RX entry and automotive
sound card entry for msm8996 automotive ADP/CDP platforms.

CRs-fixed: 2018097
Change-Id: Icbb2e9622fb58995fd063965a108d3e5fbaf42ea
Signed-off-by: Honghao Liu <honghaol@codeaurora.org>
2017-04-04 16:44:14 -04:00
Tony Truong
f83b25b95d msm: pcie: update teardown sequence for PCIe MSI interrupt
Update the teardown sequence for PCIe MSI to support
multiple endpoints.

Change-Id: I1fbdb840bf3677e30d4d27a50503c5cc70ece272
Signed-off-by: Tony Truong <truong@codeaurora.org>
2017-04-04 12:53:35 -07:00
Linux Build Service Account
28e87e960f Merge "pinctrl: lpi: Avoid initial SSR notifications at bootup" 2017-04-04 12:10:28 -07:00