mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 03:10:30 -04:00
usb: typec: ucsi: always register a link to USB PD device
UCSI driver will attempt to set a USB PD device only if it was able to
read PDOs from the firmware. This results in suboptimal behaviour, since
the PD device will be created anyway. Move calls to
typec_port_set_usb_power_delivery() out of conditional code and call it
after reading capabilities.
Fixes: b04e1747fb ("usb: typec: ucsi: Register USB Power Delivery Capabilities")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240329-qcom-ucsi-fixes-v2-4-0f5d37ed04db@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9625607f15
commit
c0f66d78f4
@@ -1575,7 +1575,6 @@ static int ucsi_register_port(struct ucsi *ucsi, struct ucsi_connector *con)
|
||||
}
|
||||
|
||||
con->port_source_caps = pd_cap;
|
||||
typec_port_set_usb_power_delivery(con->port, con->pd);
|
||||
}
|
||||
|
||||
memset(&pd_caps, 0, sizeof(pd_caps));
|
||||
@@ -1592,9 +1591,10 @@ static int ucsi_register_port(struct ucsi *ucsi, struct ucsi_connector *con)
|
||||
}
|
||||
|
||||
con->port_sink_caps = pd_cap;
|
||||
typec_port_set_usb_power_delivery(con->port, con->pd);
|
||||
}
|
||||
|
||||
typec_port_set_usb_power_delivery(con->port, con->pd);
|
||||
|
||||
/* Alternate modes */
|
||||
ret = ucsi_register_altmodes(con, UCSI_RECIPIENT_CON);
|
||||
if (ret) {
|
||||
|
||||
Reference in New Issue
Block a user