Merge "usb: typec: ucsi: check partner changed flag during notification"

This commit is contained in:
qctecmdr 2020-09-03 19:54:56 -07:00 • committed by Gerrit - the friendly Code Review server
commit 13bc62c871

View file

@ -370,6 +370,13 @@ static void ucsi_qti_notify(struct ucsi_dev *udev, unsigned int offset,
mutex_unlock(&udev->notify_lock);
if (cmd_requested && offset == UCSI_MESSAGE_IN) {
/*
* when Connector Partner Type or Flags changes,
* Connector Partner Changed bit shall be set.
*/
if (!(status->change & UCSI_CONSTAT_PARTNER_CHANGE))
return;
cancel_work_sync(&udev->notify_work);
udev->constat_info.partner_usb = false;