usb: typec: ucsi: check partner changed flag during notification
Certain Type-C USB adapters (which doesn't support PD),
when connected switch the USB port type from USB3 to USB2.
This is because the clients of UCSI receive a notification
when the response for GET_CONNECTOR_STATUS has empty partner type.
Example UCSI IPC log:
213.212929: sync_write: CONTROL: 12 00 01 00 00 00 00 00
213.216613: read: CCI: 02 09 00 80
213.221135: read: MSG_IN: 00 00 0d 00 00 00 00 00 00
Parsing the logs gives the following information:
Connect Status: connected
Power Operation Mode: USB Type-C Current - 3A
Power Direction: consumer
Connector Partner Type: Reserved
Fix this by checking whether partner changed flag is set
and not notify UCSI clients if it is not set.
Change-Id: Id8bd71c325b58f5ff45e9f69cc59776af974a885
Signed-off-by:
Linyu Yuan <linyyuan@codeaurora.org>
Loading
Please register or sign in to comment