Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

usb: typec: ucsi: Delay alternate mode discovery

Delay the ucsi_check_altmodes task to be inline with surrounding partner
tasks. This allows partner, cable and identity discovery to complete
before alternate mode registration. With that order, alternate mode
discovery can be used to indicate the ucsi driver has completed
discovery.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Jameson Thies <jthies@google.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240510201244.2968152-4-jthies@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Jameson Thies and committed by
Greg Kroah-Hartman
4ea9d86d fe8db0bb

+2 -2
+2 -2
drivers/usb/typec/ucsi/ucsi.c
··· 963 963 con->rdo = con->status.request_data_obj; 964 964 typec_set_pwr_opmode(con->port, TYPEC_PWR_MODE_PD); 965 965 ucsi_partner_task(con, ucsi_get_src_pdos, 30, 0); 966 - ucsi_partner_task(con, ucsi_check_altmodes, 30, 0); 966 + ucsi_partner_task(con, ucsi_check_altmodes, 30, HZ); 967 967 ucsi_partner_task(con, ucsi_register_partner_pdos, 1, HZ); 968 968 break; 969 969 case UCSI_CONSTAT_PWR_OPMODE_TYPEC1_5: ··· 1247 1247 } 1248 1248 1249 1249 if (con->status.change & UCSI_CONSTAT_CAM_CHANGE) 1250 - ucsi_partner_task(con, ucsi_check_altmodes, 1, 0); 1250 + ucsi_partner_task(con, ucsi_check_altmodes, 1, HZ); 1251 1251 1252 1252 out_unlock: 1253 1253 mutex_unlock(&con->lock);