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

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

Merge "usb: pd: Don't retry sending Source Capabilities if PD capable"

parents 60ef8525 91d216f4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -908,6 +908,7 @@ static void pd_send_hard_reset(struct usbpd *pd)
	pd->hard_reset_count++;
	pd_phy_signal(HARD_RESET_SIG);
	pd->in_pr_swap = false;
	pd->pd_connected = false;
	power_supply_set_property(pd->usb_psy, POWER_SUPPLY_PROP_PR_SWAP, &val);
}

@@ -2222,6 +2223,10 @@ static void handle_state_src_send_capabilities(struct usbpd *pd,
	ret = pd_send_msg(pd, MSG_SOURCE_CAPABILITIES, default_src_caps,
			ARRAY_SIZE(default_src_caps), SOP_MSG);
	if (ret) {
		if (pd->pd_connected) {
			usbpd_set_state(pd, PE_SEND_SOFT_RESET);
			return;
		}
		/*
		 * Technically this is PE_SRC_Discovery, but we can
		 * handle it by setting a timer to come back to the