Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1bed1828 authored by Linyu Yuan's avatar Linyu Yuan
Browse files

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: default avatarLinyu Yuan <linyyuan@codeaurora.org>
parent 485aca84
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment