According to the PD 2.0 Spec, Section 6.2.1.3, the MessageID
field shall only be incremented upon successful transmission
(meaning GoodCRC was received). Thus, increment the counter
only when pd_phy_write() succeeds.
Change-Id: I73dce5736c473a1f79db9be868442c7941d13c44
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Currently, there is an incorrect programming of the
hdmi controller register where default value of the
datapath mode bit is being toggled along with the
scrambler enable/disable.
This bit should be untouched as per the hardware
programming sequence and kept at the default state.
Fix the register programming to avoid toggling this
bit.
Change-Id: I2e8f74c0abaddd27b5d8a2136afc4e1b82f96e7d
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Commit c20c74d49c ("ARM: dts: msm: Remove TCSR_QUSB2_PHY_CLAMP_DIG_N_1P8
for SDM660") is added to remove enabling/disabling clamp during
disconnect/connect. But it is required to enable clamp input to QUSB2PHY,
whenever 0.9V LDO is collapsed. Hence revert the change to add dtsi
property for enable/disable clamp.
Change-Id: I12009bd56d214499a73f7ea3e73d1c979c107ac9
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
By default IPC Router core uses edge and port specific wakeup sources
which are blocking system suspend in special use cases like streaming
non wakeup sensors data at high speed.
Add dynamic wakeup source enable/disable functionality to acquire the
wakeup source only during the APPS suspend stage.
CRs-Fixed: 2057391
Change-Id: I2a5ea4e2c31432a9dd195c702ef7001b26eed33d
Signed-off-by: Arun Kumar Neelakantam <aneela@codeaurora.org>
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>
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>
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>