When the CC state change IRQ fires on USB removal the debounce done
status may still be high, and the removal cleanup will not be called.
Use the UFP/DFP status bits to determine whether the CC lines are
present or not instead.
While at it cache the CC state so it doesn't have to be derived
everywhere it is needed. The status bits are already cached, so there
should be no functional difference.
Change-Id: Ifb89c78a032ae9d38fbc8c281518698941e131c2
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Upon receiving a PD message the state machine is queued to
act on it. However, if another message is received quickly
before usbpd_sm is scheduled, it will only process the first
message. Add a check if the RX queue is not empty in order
to drain the messages properly.
Change-Id: Ie9e079a51a5740024c9a1be5ba27b3edacf9b2df
Signed-off-by: Jack Pham <jackp@codeaurora.org>
There are two definitions of struct dss_vreg in mdss driver.
One is used during parsing regulators from device tree file,
the other is used when operating regulators. This introduces
different understanding of dss_vreg data in these two places.
Future plan is to have only one definition for these shared
data structure. Currently only make dss_vreg in sync to fix
this issue.
CRs-Fixed: 2054371
Change-Id: I4f16e1409c832432fa1df73b0ae030176b664e58
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
Modify coresight device node in dts to comply with the
new implementation of coresight driver for msm8996.
Change-Id: I10b236208a1f9e76b4d27a623c024b1f9f6a50ca
Signed-off-by: Wei Li <weili@codeaurora.org>
Port of ioctl validation for zero length ioctl
from camera_v2.
Change-Id: I635522f331d1e18641196ee3101c64ccc285636a
CRs-fixed: 2025367
Signed-off-by: Terence Ho <terenceh@codeaurora.org>
In function submit_create, if nr_cmds or nr_bos is assigned with
negative value, the allocated buffer may be small than intended.
Using this buffer will lead to buffer overflow issue.
Change-Id: I0b61cccffd836e2dd3c859446470af4b6451b9ed
Signed-off-by: Kasin Li <donglil@codeaurora.org>
Get_Source_Cap message is responded by sending source capability message
without running sender response timer after GoodCRC is received. As a
result if sender response is timed out driver is not issuing hard reset.
Fix the issue by moving policy engine state from PE_SRC_READY to
PE_SRC_SEND_CAPABILITIES which starts sender response timer and handles
timeout.
Change-Id: Id47a4c8f989db19d28ef9c8b2c069d0b7797e17f
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>