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

Commit 790f1d60 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ucsi: start usb host mode when partner type is power cable/ufp"

parents c06a32d6 76543a19
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -481,6 +481,8 @@ static void ucsi_partner_change(struct ucsi_connector *con)

	switch (UCSI_CONSTAT_PARTNER_TYPE(con->status.flags)) {
	case UCSI_CONSTAT_PARTNER_TYPE_UFP:
	case UCSI_CONSTAT_PARTNER_TYPE_CABLE:
	case UCSI_CONSTAT_PARTNER_TYPE_CABLE_AND_UFP:
		u_role = USB_ROLE_HOST;
		typec_set_data_role(con->port, TYPEC_HOST);
		break;
@@ -550,6 +552,8 @@ static void ucsi_handle_connector_change(struct work_struct *work)

		switch (UCSI_CONSTAT_PARTNER_TYPE(con->status.flags)) {
		case UCSI_CONSTAT_PARTNER_TYPE_UFP:
		case UCSI_CONSTAT_PARTNER_TYPE_CABLE:
		case UCSI_CONSTAT_PARTNER_TYPE_CABLE_AND_UFP:
			u_role = USB_ROLE_HOST;
			typec_set_data_role(con->port, TYPEC_HOST);
			break;
@@ -858,6 +862,8 @@ static int ucsi_register_port(struct ucsi *ucsi, int index)

	switch (UCSI_CONSTAT_PARTNER_TYPE(con->status.flags)) {
	case UCSI_CONSTAT_PARTNER_TYPE_UFP:
	case UCSI_CONSTAT_PARTNER_TYPE_CABLE:
	case UCSI_CONSTAT_PARTNER_TYPE_CABLE_AND_UFP:
		role = USB_ROLE_HOST;
		typec_set_data_role(con->port, TYPEC_HOST);
		break;