usb: typec: ucsi: Don't stop alt mode registration on busy condition
If the PPM says it's busy, we can now simply try again. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Link: https://lore.kernel.org/r/20210920142419.54493-3-heikki.krogerus@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
094902bc6a
commit
47eb8de3bb
@@ -437,6 +437,8 @@ static int ucsi_register_altmodes(struct ucsi_connector *con, u8 recipient)
|
||||
command |= UCSI_GET_ALTMODE_CONNECTOR_NUMBER(con->num);
|
||||
command |= UCSI_GET_ALTMODE_OFFSET(i);
|
||||
len = ucsi_send_command(con->ucsi, command, alt, sizeof(alt));
|
||||
if (len == -EBUSY)
|
||||
continue;
|
||||
if (len <= 0)
|
||||
return len;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user