Commit graph

590058 commits

Author SHA1 Message Date
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
Jack Pham
95d46e9eb0 usb: pd: Don't draw current during sink hard reset
During hard reset inform charger driver to suspend current draw
as the sink should not draw more than 1mA while VBUS is driven
to VSafe0V. Once VBUS returns to VSafe5V the current draw can be
restored when contract is re-established.

Change-Id: I3f529c861706d4544f3c8b65d6fc6be47a598309
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2017-05-26 14:35:06 -07:00
Jack Pham
7805ee656a usb: pd: Notify charger when PR Swap is in progress
Charger driver needs to know when PR Swap is happening in
order to avoid resetting state when the disconnect (which
is expected) occurs. Utilize the new power supply PR_SWAP
property to notify whenever PD is in PR Swap.

Change-Id: I13fdbd4a3cf3e0716d48d1268795189f6b064598
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2017-05-26 14:35:06 -07:00
Abhijeet Dharmapurikar
ef4834bc69 battery: don't wait for aicl rerun
In the callback to change the usb icl, the current code waits to
rerun AICL. These waits were to ensure that AICL completes and we
can restore parallel charger once done.

However, these waits are unnecessary since we invoke code to
enable USBIN_I_VOTER for parallel charger in a workqueue. Moreover,
these wait causes compliance failures. Remove those waits.

Change-Id: Id2e3ca87e111aa415c47683a2cc365a9bece7ffb
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-05-26 14:29:25 -07:00
Abhijeet Dharmapurikar
86e1155676 smb-lib: ignore disconnects during power role swap
During a power_role swap, the CC lines get disconnected for a bit.
This causes the charger driver to prematurely declare a disconnection
and it resets back to disconnected state.

Update the code to distinguish a disconnect caused during PR_SWAP vs
a real disconnect.
Avoid
- resetting the CC line to HW control
- switching DRP mode
- enabling the crude sensor workaround
- enabling APSD
during a discconnet caused by PR_SWAP

Note that PR_SWAP setting/unsetting needs to done regardless of the
connected state of the CC line. When PR_SWAP is notified to be
completed and the CC lines are still seen disconnected call the real
disconnect code.

While at it Vconn can be disabled too in the real disconnect code path.

Change-Id: I97ab7ee343c5b2bcf25797e6acbb1de37f5ba00a
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-05-26 14:29:13 -07:00
Abhijeet Dharmapurikar
e91e2202ec power_supply: introduce PR_SWAP property
Introduce POWER_SUPPLY_PROP_PR_SWAP to notify if the device is in
power role swap.

Change-Id: I8d0cb3a71ec1a646b7ec37405e66cb00ddc40e0d
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-05-26 11:29:38 -07:00
Abhijeet Dharmapurikar
85d191129e smb-lib: reset SDP draw to 100mA
The driver could leave SDP's current draw to a higher value
once its removed. This is because the code to reset the
current limit needs the type to be SDP to reset it which is
not going to be the case after removal.

So reset SDPs current limit back to 100mA in the code path
for non-SDP chargers.

Change-Id: Idfb9df1b72a17f1db63265b85f6546cbb77c4018
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2017-05-26 11:29:37 -07:00
Linux Build Service Account
a2ab165607 Merge "genirq: Use irq_set_affinity_locked to change irq affinity" 2017-05-26 00:10:43 -07:00
Linux Build Service Account
18c1ad4d51 Merge "mmc: core: retune after un-gating the clocks" 2017-05-26 00:10:42 -07:00
Linux Build Service Account
22412a0523 Merge "icnss: Free regread buffer before allocating new one" 2017-05-26 00:10:41 -07:00
Linux Build Service Account
4fae1bf22a Merge "ARM: dts: msm: Change version bit to match TP 800S used for HDK660/630" 2017-05-26 00:10:40 -07:00
Linux Build Service Account
88d0f2244b Merge "ARM: dts: msm: add proxy voter for QRD SDM660" 2017-05-26 00:10:39 -07:00
Linux Build Service Account
c78cb70a36 Merge "ARM: dts: msm: configure interrupt types for charger for pm660" 2017-05-26 00:10:38 -07:00
Linux Build Service Account
12896a6fc6 Merge "mmc: core: extend SDR104 workaround for other paths" 2017-05-26 00:10:37 -07:00
Linux Build Service Account
f5b9a7e270 Merge "icnss: create debugfs entries when CONFIG_ICNSS_DEBUG is enabled" 2017-05-26 00:10:35 -07:00
Linux Build Service Account
66a27a3a8f Merge "mhi: core: fix potential buffer overflow" 2017-05-26 00:10:34 -07:00
Linux Build Service Account
aa6325414f Merge "usb: pd: policy_engine: Disable vconn first upon disconnect" 2017-05-26 00:10:34 -07:00
Linux Build Service Account
761009ddd7 Merge "defconfig: msmcortex: Enable hardened user copy" 2017-05-26 00:10:33 -07:00
Linux Build Service Account
bd5238c5e7 Merge "cnss: save the cc source to platform driver" 2017-05-26 00:10:30 -07:00
Linux Build Service Account
c5a3a7fe46 Merge "Revert "arm: cpu: read all address cells in dt for cpuid"" 2017-05-26 00:10:29 -07:00
Linux Build Service Account
7d371c9315 Merge "soc: qcom: glink: Add new APIs to toggle RX thread priority" 2017-05-26 00:10:29 -07:00
Linux Build Service Account
5c161901b2 Merge "ASoC: msm: qdsp6v2: set voc type according to stream type" 2017-05-26 00:10:28 -07:00
Linux Build Service Account
cf2d68fe6a Merge "msm: pcie: add IOMMU_DEVICE for MMIO mapping" 2017-05-26 00:10:27 -07:00
Linux Build Service Account
a24cba4428 Merge "drm/msm: add irq mapping for cec in hdmi driver" 2017-05-26 00:09:47 -07:00
Linux Build Service Account
03da53eca2 Merge "msm_11ad: define ops_keep_radio_on_during_sleep as static" 2017-05-26 00:09:47 -07:00
Linux Build Service Account
34672d4fb7 Merge "ARM: dts: msm: add audio support for HDK660/630 boards" 2017-05-26 00:09:46 -07:00
Linux Build Service Account
187608370f Merge "soc: qcom: msm_bus: add rt mutex lock for cllist data" 2017-05-26 00:09:45 -07:00
Linux Build Service Account
7e32d73762 Merge "ARM: dts: msm: Specify SC interrupts for LAB/IBB in pmi8998" 2017-05-26 00:09:43 -07:00
Linux Build Service Account
b56ec29b40 Merge "qpnp: smb2: fix ICL recovery mechanism" 2017-05-26 00:09:37 -07:00
Linux Build Service Account
21dd810c7c Merge "qpnp-smb2: update AICL rerun logic for PM660" 2017-05-26 00:09:36 -07:00
Linux Build Service Account
b7e32b139c Merge "soc: qcom: pil: Use subsys_set_error to indicate firmware errors" 2017-05-26 00:09:35 -07:00
Linux Build Service Account
b4f36ef221 Merge "leds: qpnp-flash-v2: Add support for LPG strobe" 2017-05-26 00:09:34 -07:00
Linux Build Service Account
a5a24462df Merge "ARM: dts: msm: Enable the quat mi2s in slave mode on apq8098 mediabox" 2017-05-26 00:09:33 -07:00
Linux Build Service Account
972dd643bf Merge "ARM: dts: msm: update tuning parameters for QMP PHY for SDM660" 2017-05-26 00:09:32 -07:00
Linux Build Service Account
c5685ec0f3 Merge "msm: kgsl: Return mementry only if pending_free is not set" 2017-05-25 15:52:15 -07:00
Linux Build Service Account
b8b329161d Merge "leds: leds-qpnp: Fix uninitialized variable use" 2017-05-25 15:52:14 -07:00
Linux Build Service Account
06666778bf Merge "btfm: Don't program multi channel registers in wcn3990 for SCO" 2017-05-25 15:52:07 -07:00
Linux Build Service Account
8a1c7fb05a Merge "power: qpnp-fg-gen3: update default empty voltage to 2.85 V" 2017-05-25 15:52:06 -07:00
Linux Build Service Account
93f01bb760 Merge "msm: kgsl: Don't delete uninitialized preemption timer" 2017-05-25 15:52:05 -07:00
Linux Build Service Account
2371551ec1 Merge "msm_11ad: fix device-tree property name" 2017-05-25 15:52:04 -07:00
Linux Build Service Account
f485573f5a Merge "net: rmnet_data: Unset logical end points in bridge mode" 2017-05-25 15:52:04 -07:00
Linux Build Service Account
17f988f036 Merge "soc: qcom: smp2p: Fix simultaneous access of global loopback data" 2017-05-25 15:52:03 -07:00
Linux Build Service Account
20dfa6c9f7 Merge "qcom: common_log: make dump registration as async" 2017-05-25 15:52:02 -07:00
Linux Build Service Account
73f6909d54 Merge "spmi-pmic-arb: add support to dispatch interrupt based on IRQ status" 2017-05-25 15:52:01 -07:00
Linux Build Service Account
e2a2179d4e Merge "spcom: check error from ion_import_dma_buf()" 2017-05-25 15:52:00 -07:00
Linux Build Service Account
09173073cf Merge "spcom: silent error messages until spss link is up" 2017-05-25 15:51:59 -07:00
Linux Build Service Account
97b8c1c0f8 Merge "usb: pdphy: Widen voltage range setting for VDD regulator" 2017-05-25 15:51:58 -07:00
Linux Build Service Account
fafa9a46eb Merge "usb : dwc3: Initialize kernel stack variables properly" 2017-05-25 15:51:57 -07:00
Linux Build Service Account
f95c3de80f Merge "ASoC: msm: qdsp6v2: Add IEC61937 compressed HDMI pass-though" 2017-05-25 15:51:57 -07:00