Commit graph

590735 commits

Author SHA1 Message Date
Jack Pham
71c2e3fc4f usb: pdphy: Prevent sending when message is just received
Prevent pd_phy_write() from sending a TX message if an RX
message IRQ is being handled, or if the RX_TOKEN is set
(indicating a message has just arrived) by returning -EBUSY
to let the upper layer gracefully abort. This helps in cases
(such as compliance testing) in which VDM messages are
received very quickly after one another and the protocol
layer needs to first handle the incoming message.

Change-Id: I3e26d7ff062ff7f51b6c66ab8d078b05749f808a
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2017-06-06 22:50:28 -07:00
Jack Pham
00adcfcbad usb: pd: Keep PROP_PR_SWAP set during ERROR_RECOVERY
Since ErrorRecovery handling requires a spoof disconnect, the
charger driver needs to avoid immediately reapplying the
terminations. Re-use the PROP_PR_SWAP property which ignores
the disconnect. After the 25ms delay, policy engine will
explicitly reset back to DRP.

Also remove the transition to ErrorRecovery from PE_SNK_DISCOVERY
as it is removed in V1.3 of the PD 2.0 specification.

Change-Id: I41f1da293208b6813dfb540a123ee84ac35b4a68
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2017-06-06 22:50:27 -07:00
Jack Pham
ed97270b78 usb: pd: Set PD_IN_HARD_RESET as soon as hard reset received
Move setting of PD_IN_HARD_RESET to the phy_sig_received()
callback in order to inform the charger to ignore the upcoming
VBUS toggle as soon as possible. This will help decrease the
possibility of racing to set the appropriate HW bits while
VBUS turns off and leads to the charger indicating disconnect.

Change-Id: I42cc2969defa48c9987fa4bea64780866861d868
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2017-06-06 22:50:26 -07:00
Linux Build Service Account
eb28d0da15 Merge "regulator: spm-regulator: Add support for FTS426 type regulators" 2017-06-06 21:33:16 -07:00
Linux Build Service Account
feb56ddbc1 Merge "ath10k: Update world regulatory rules" 2017-06-06 21:33:14 -07:00
Linux Build Service Account
ceffb12dba Merge "wil6210: stop TX queues when suspending" 2017-06-06 21:33:13 -07:00
Linux Build Service Account
e01e0ecf6a Merge "ARM: dts: msm: Defer regulator disable for SDM660 GPU SMMU" 2017-06-06 21:33:12 -07:00
Linux Build Service Account
61a82b2a3f Merge "msm: cec: Use CEC notifier framework in adapter driver" 2017-06-06 21:33:09 -07:00
Linux Build Service Account
fc6bb14548 Merge "fbdev: core: Initialise structure to prevent kernel information leak" 2017-06-06 21:33:08 -07:00
Linux Build Service Account
fb0ac8cd2b Merge "hrtimer: Don't drop the base lock when migration during isolation" 2017-06-06 21:33:06 -07:00
Linux Build Service Account
ccf240d7b7 Merge "msm: camera: isp: Disable SMMU stall upon VFE page fault" 2017-06-06 21:33:05 -07:00
Linux Build Service Account
c588e27b98 Merge "msm: camera: Prevent info leak in kernel driver." 2017-06-06 21:33:04 -07:00
Linux Build Service Account
412bca522f Merge "msm: camera: isp: Avoid information leak in ISPIF" 2017-06-06 21:33:04 -07:00
Linux Build Service Account
e5f02a0e83 Merge "ARM: dts: msm: Add cpp micro reset flag for SDM630" 2017-06-06 21:33:02 -07:00
Devi Sandeep Endluri V V
37342445e7 netfilter:Notify user space on creating sysfs file
uevent indication is required to notify the user space
on creation of sysfs file entry.
This helps in creating specific sysfs labeled entries
for newly created file which are module specific.

Change-Id: I576fa77158445ced6d5efb93b5d724d75f30b03f
CRs-Fixed: 2056628
Acked-by: Manoj Basapathi <manojbm@qti.qualcomm.com>
Signed-off-by: Tejaswi Tanikella <tejaswit@codeaurora.org>
2017-06-06 21:08:11 -07:00
Sujeev Dias
90bf661847 mhi: core: Add support for host triggered device ram dump
Add support for bus master to trigger PCIe device into ram dump
mode to collect device ram dump. RDDM capabilities are extended to
support under kernel panic as well.

CRs-Fixed: 2055981
Change-Id: I18f7d5784992df70aafc6e41d248ced3fac37181
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
2017-06-06 16:15:49 -07:00
Sujeev Dias
220c2f0aed mhi: core: Add support for PCIe linkdown abort
PCIe linkdown event can trigger anytime. During linkdown event
abort any work MHI host doing that require PCIE link.

CRs-Fixed: 2055975
Change-Id: Idba907c7977594dc08575e0020a7afa4868bc0e4
Signed-off-by: Sujeev Dias <sdias@codeaurora.org>
2017-06-06 16:15:04 -07:00
Abhijit Kulkarni
ea0f90a866 drm/msm/sde: add secure use case properties
This change adds custom PLANE(fb_translation_mode) and
CRTC(security_level) properties for supporting secure use case.
Plane property identifies the translation requirement for the
planes. CRTC property speicifies what planes could be attached
to this CRTC.

CRs-Fixed: 2053654
Change-Id: Iea59027d4bee536c8554e3955723982a6fc361dd
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2017-06-06 13:44:08 -07:00
Linux Build Service Account
ccde34ffb3 Merge "spcom: move SPCOM_MAX_CHANNELS define to uapi/linux/spcom.h" 2017-06-06 13:21:57 -07:00
Linux Build Service Account
f96ac4e094 Merge "mmc: debugfs: fix unclocked register access by force_error" 2017-06-06 13:21:57 -07:00
Linux Build Service Account
952a3f35ab Merge "ASoC: msm8998: fix clock refcount for MI2S/AUXPCM shutdown" 2017-06-06 13:21:54 -07:00
Linux Build Service Account
f7346af205 Merge "ASoC: msm: return the latest app type cfg data set when get is called" 2017-06-06 13:21:53 -07:00
Linux Build Service Account
9a3e66cffb Merge "Revert "ASoC: wcd9335: enable APC in Tx path"" 2017-06-06 13:21:51 -07:00
Linux Build Service Account
43f1e336c2 Merge "smb-lib: clear EXIT_SNK_BASED_ON_CC BIT after cable removal" 2017-06-06 13:21:50 -07:00
Linux Build Service Account
1d5844ba9d Merge "sched: hmp: Optimize cycle counter reads" 2017-06-06 13:21:50 -07:00
Linux Build Service Account
2d08b001ac Merge "battery: remove 20ms delay for running AICL" 2017-06-06 13:21:49 -07:00
Linux Build Service Account
6ed51e0bab Merge "sched: Don't active migrate tasks to CPUs in the same cluster" 2017-06-06 13:21:48 -07:00
Linux Build Service Account
e227c0d7c3 Merge "smb-lib: change debounce time to 20mS while in pr_swap" 2017-06-06 13:21:47 -07:00
Linux Build Service Account
dbc81522c3 Merge "power: qcom: smb-lib: check for USB removal after legacy WA" 2017-06-06 13:21:46 -07:00
Linux Build Service Account
56f84db22e Merge "mhi: core: Using usleep_range instead of msleep for sleep" 2017-06-06 13:21:45 -07:00
Linux Build Service Account
6ce38a9691 Merge "drm/msm: Separate locking of buffer resources from struct_mutex" 2017-06-06 13:21:43 -07:00
Linux Build Service Account
7ceaecca8a Merge "qseecom: fix listener unregistration issue" 2017-06-06 13:21:42 -07:00
Linux Build Service Account
3109a13038 Merge "ARM: dts: msm: Fix panel roi alignment on msm8998" 2017-06-06 13:21:41 -07:00
Linux Build Service Account
be68a3874e Merge "phy: qcom-ufs-qmp-v3: fix UFS NOP Timeout" 2017-06-06 13:21:40 -07:00
Linux Build Service Account
0d1b465cb8 Merge "sched: Fix load tracking bug to avoid adding phantom task demand" 2017-06-06 13:21:39 -07:00
Linux Build Service Account
1d0af2abf0 Merge "wil6210: support devices with different PCIe bar size" 2017-06-06 13:21:38 -07:00
Linux Build Service Account
3eb3dbc346 Merge "ARM: dts: msm: Enable DRD mode for 2nd USB controller on MSM8996 Auto" 2017-06-06 13:21:37 -07:00
Linux Build Service Account
37bca2d337 Merge "msm: camera: isp: Add bound check for an array" 2017-06-06 13:21:36 -07:00
Linux Build Service Account
f846530324 Merge "Revert "defconfig: msmcortex_mediabox: Disable MODULE_SIG"" 2017-06-06 13:21:35 -07:00
Bao D. Nguyen
04147f52cc scsi: ufs: Avoid dead lock during error recovery
The UFS error handler work may be entered from the clock scaling context
which may have acquired the lock used to synchronize between clock scaling
and shutdown. Part of the error handler work is to send management
requests during which the same synchronization lock is acquired again.
This condition leads to a dead lock. To avoid this dead lock,
skip acquiring the synchronization lock when sending management
requests as part of the error handler.

Change-Id: I38179528868aaeb4a788a83ca8f9c458afea862a
Signed-off-by: Bao D. Nguyen <nguyenb@codeaurora.org>
2017-06-06 12:19:21 -07:00
Neeraj Soni
c9762c3c1a dm: md: Replace scheduling of request with direct call
This is found to be improving the performance of Random
read and write with FDE enabled. The scheduling was
introduced as part of 4.4 kernel for mq support.

Change-Id: I300750b5f7f1cff4b81f028ae938e7d2b3652bd2
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
2017-06-06 18:57:07 +05:30
Srivatsa Vaddagiri
616d69980a soc: qcom: subsys-pil-tz: Initialize subsys_dev pointer
Without this pointer being correctly initialized, subsys_set_error()
would end up accessing invalid memory

Change-Id: Ic62224e830d17c25f2bf9eeeecc81422fc0d5906
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
2017-06-06 02:45:32 -07:00
Amir Samuelov
5b99a712e5 spcom: move SPCOM_MAX_CHANNELS define to uapi/linux/spcom.h
Move SPCOM_MAX_CHANNELS to common H file to make sure that kernel spcom
driver and user space spcomlib library are synced.

Change-Id: I5e19f8def7de755fa89b6a5c67e9d3372f8433f1
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2017-06-06 00:49:08 -07:00
Rajesh Kemisetti
7241f32c49 ARM: dts: msm: Defer regulator disable for SDM660 GPU SMMU
IOMMU driver takes vote on regulator for every unmap, attach or
detach call and removes it once done.

This is an overhead if GPU is in power collapse mode and huge
number of unmap calls are pending from a given context. It would
end up in turning ON/OFF the regulator those many times.

To optimize this, do a deferred regulator disable about 80ms so that
all subsequent requests to regulator enable will be just refcounted.

Change-Id: I816156f1bdf34a2c0cb8171c2ca1df6b3ae8fe72
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
2017-06-06 11:32:27 +05:30
Ray Zhang
806fdaa479 msm: cec: Use CEC notifier framework in adapter driver
Enable CEC notifier support in CEC adapter driver, so the
adapter could get notification whenever physical address
is available. This removes the requirement for userspace
to manually set physical address.

CRs-Fixed: 2041335
Change-Id: I337c189d625922391374d3cdeb1f2840ad829cd7
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2017-06-06 09:54:25 +08:00
Can Guo
20e817d30c mmc: debugfs: fix unclocked register access by force_error
When echo values to debugfs entry force_error, unclocked
register access error would be detected. This change fixes
it by making sure the host is powered up and host clock is
ticking before access force event register for error
interrupt status.

Change-Id: I995523d64de36cd4872209db4a558aa83103fbb3
Signed-off-by: Can Guo <cang@codeaurora.org>
2017-06-06 09:39:30 +08:00
Subbaraman Narayanamurthy
4dba5345e1 power: qpnp-fg-gen3: Fix possible integer overflow
Currently, DIV_ROUND_CLOSEST is used while finding the delta
between initial and final cc_soc_sw in terms of percentage. This
can go beyond 32 bits with the intermediate multiplication before
it is down-converted back to less than 32 bits. Fix this.

Also, when the cc_soc_sw delta is less than 50 %, discard the
data so that the last learned capacity won't be updated.

While at it, fix a similar use of DIV_ROUND_CLOSEST in another
place fg_encode_default() where an integer overflow can happen
if it is passed with large integer values.

Change-Id: Ia2b0f5456663a90bcd32a4fed52d1e579cff4e1f
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-06-05 18:20:04 -07:00
Abhijeet Dharmapurikar
f59ca29be6 smb-lib: clear EXIT_SNK_BASED_ON_CC BIT after cable removal
EXIT_SNK_BASED_ON_CC bit is only to be used while we are in hard
reset. There is a possibility for that bit to remain set if
cable were removed while a hard reset was in progress.

Clear that bit in removal path

Change-Id: I5e0776de9322a8015f851312df51a202e35c7a78
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-06-05 17:33:35 -07:00
Veerabhadrarao Badiganti
9c123aff46 mmc: core: Fix the issue with clock scaling in resume-scaling
In resume_scaling, the host current clock is compared with max clock
of the card to adjust the current-scaling clock.

If max clock supported by the card is more than the max clock that the
host can support, then the above-mentioned comparison is resulting in
setting the current-scaling clock to scale-down clock frequency even
though current host clock is at the maximum clock. This will lead to
skipping of scaling down to lower clock in low load use-cases. So clock
would remain at max clock till next time clock is scaled up and then
scaled down.

To prevent this scenario, compare the host current clock with max clock
that host can be scaled-up instead of max clock of the card.

Change-Id: Ibbed4bb374f1cbb5aee21cfca4e7e97d8f999d51
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
2017-06-05 20:08:37 +05:30
Vijayavardhan Vennapusa
77386df356 policy_engine: Add module parameter to start USB stack
USB 3.1 super speed compliance equipment may be detected as floating
charger by PMI as it may leave D+/D- lines floating (High speed data
lines). PD Policy engine does not start USB stack which results into
compliance failure as compliance expects USB stack to be started. Add
module parameter usb_compliance_mode to start USB stack on cable
connect (w/o depending on charger type).

Change-Id: Ieb33057a85b4bcff9c1e7c32c256663dd23f17ef
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-06-05 18:42:57 +05:30