From: Greg Kroah-Hartman Date: Mon, 9 Sep 2024 06:40:22 +0000 (+0200) Subject: Merge 6.11-rc7 into usb-next X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f299cd11f7539482e87b2d2d527968a26b33f0ec;p=users%2Fdwmw2%2Flinux.git Merge 6.11-rc7 into usb-next We need the USB fixes in here as well, and this also resolves the merge conflict in: drivers/usb/typec/ucsi/ucsi.c Reported-by: Stephen Rothwell Signed-off-by: Greg Kroah-Hartman --- f299cd11f7539482e87b2d2d527968a26b33f0ec diff --cc drivers/usb/typec/ucsi/ucsi.c index f0b5867048e25,17155ed17fdf8..35dce4057c25c --- a/drivers/usb/typec/ucsi/ucsi.c +++ b/drivers/usb/typec/ucsi/ucsi.c @@@ -929,12 -993,11 +939,12 @@@ static int ucsi_register_cable(struct u break; } - desc.identity = &con->cable_identity; + if (con->ucsi->cap.features & UCSI_CAP_GET_PD_MESSAGE) + desc.identity = &con->cable_identity; - desc.active = !!(UCSI_CABLE_PROP_FLAG_ACTIVE_CABLE & - con->cable_prop.flags); - desc.pd_revision = UCSI_CABLE_PROP_FLAG_PD_MAJOR_REV_AS_BCD( - con->cable_prop.flags); + desc.active = !!(UCSI_CABLE_PROP_FLAG_ACTIVE_CABLE & cable_prop.flags); + + if (con->ucsi->version >= UCSI_VERSION_2_1) + desc.pd_revision = UCSI_CABLE_PROP_FLAG_PD_MAJOR_REV_AS_BCD(cable_prop.flags); cable = typec_register_cable(con->port, &desc); if (IS_ERR(cable)) { @@@ -1009,10 -1094,8 +1041,9 @@@ static int ucsi_register_partner(struc if (pwr_opmode == UCSI_CONSTAT_PWR_OPMODE_PD) ucsi_register_device_pdos(con); - desc.identity = &con->partner_identity; + if (con->ucsi->cap.features & UCSI_CAP_GET_PD_MESSAGE) + desc.identity = &con->partner_identity; desc.usb_pd = pwr_opmode == UCSI_CONSTAT_PWR_OPMODE_PD; - desc.pd_revision = UCSI_CONCAP_FLAG_PARTNER_PD_MAJOR_REV_AS_BCD(con->cap.flags); partner = typec_register_partner(con->port, &desc); if (IS_ERR(partner)) {