summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLiang Liang (Leo) <liang.liang@amd.com>2020-12-01 07:01:49 -0500
committerAlex Deucher <alexander.deucher@amd.com>2020-12-23 15:07:58 -0500
commit4a3e6ad2b59e607f0c908c672cd528323a76e548 (patch)
tree987469a4d0b1cd130b527756c0eebd5e1d30d756
parent4f1431db92d801ae055ae5babe50bcbe1ce2feee (diff)
usb: typec: ucsi: check cci busy during PPM reset
[Why] Following the spec of UCSI, EC may return CCI_BUSY for PPM reset cmd. [How] Check CCI_BUSY bit. Jira ID: SCSWATH-10 Signed-off-by: Liang Liang (Leo) <liang.liang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/usb/typec/ucsi/ucsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index 758b988ac518..a41dca0f7dfe 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -759,7 +759,7 @@ static int ucsi_reset_ppm(struct ucsi *ucsi)
goto out;
/* If the PPM is still doing something else, reset it again. */
- if (cci & ~UCSI_CCI_RESET_COMPLETE) {
+ if (cci & ~(UCSI_CCI_RESET_COMPLETE | UCSI_CCI_BUSY)) {
ret = ucsi->ops->async_write(ucsi, UCSI_CONTROL,
&command,
sizeof(command));