mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 19:07:52 +00:00
usb: typec: ucsi_glink: drop special handling for CCI_BUSY
[ Upstream commit 1a395af9d5
]
Newer Qualcomm platforms (sm8450+) successfully handle busy state and
send the Command Completion after sending the Busy state. Older devices
have firmware bug and can not continue after sending the CCI_BUSY state,
but the command that leads to CCI_BUSY is already forbidden by the
NO_PARTNER_PDOS quirk.
Follow other UCSI glue drivers and drop special handling for CCI_BUSY
event. Let the UCSI core properly handle this state.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240408-qcom-ucsi-fixes-bis-v1-3-716c145ca4b1@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
eba944dffe
commit
38e6a52966
1 changed files with 3 additions and 5 deletions
|
@ -175,7 +175,8 @@ static int pmic_glink_ucsi_sync_write(struct ucsi *__ucsi, unsigned int offset,
|
||||||
left = wait_for_completion_timeout(&ucsi->sync_ack, 5 * HZ);
|
left = wait_for_completion_timeout(&ucsi->sync_ack, 5 * HZ);
|
||||||
if (!left) {
|
if (!left) {
|
||||||
dev_err(ucsi->dev, "timeout waiting for UCSI sync write response\n");
|
dev_err(ucsi->dev, "timeout waiting for UCSI sync write response\n");
|
||||||
ret = -ETIMEDOUT;
|
/* return 0 here and let core UCSI code handle the CCI_BUSY */
|
||||||
|
ret = 0;
|
||||||
} else if (ucsi->sync_val) {
|
} else if (ucsi->sync_val) {
|
||||||
dev_err(ucsi->dev, "sync write returned: %d\n", ucsi->sync_val);
|
dev_err(ucsi->dev, "sync write returned: %d\n", ucsi->sync_val);
|
||||||
}
|
}
|
||||||
|
@ -242,10 +243,7 @@ static void pmic_glink_ucsi_notify(struct work_struct *work)
|
||||||
ucsi_connector_change(ucsi->ucsi, con_num);
|
ucsi_connector_change(ucsi->ucsi, con_num);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ucsi->sync_pending && cci & UCSI_CCI_BUSY) {
|
if (ucsi->sync_pending &&
|
||||||
ucsi->sync_val = -EBUSY;
|
|
||||||
complete(&ucsi->sync_ack);
|
|
||||||
} else if (ucsi->sync_pending &&
|
|
||||||
(cci & (UCSI_CCI_ACK_COMPLETE | UCSI_CCI_COMMAND_COMPLETE))) {
|
(cci & (UCSI_CCI_ACK_COMPLETE | UCSI_CCI_COMMAND_COMPLETE))) {
|
||||||
complete(&ucsi->sync_ack);
|
complete(&ucsi->sync_ack);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue