]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge 6.11-rc7 into usb-next
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Sep 2024 06:40:22 +0000 (08:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Sep 2024 06:40:22 +0000 (08:40 +0200)
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 <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1  2 
drivers/usb/gadget/udc/cdns2/cdns2-gadget.c
drivers/usb/typec/ucsi/ucsi.c
drivers/usb/typec/ucsi/ucsi.h

index f0b5867048e252359e047abf0132d4ae973493ae,17155ed17fdf840ee9c863c8216371d4639d1b9b..35dce4057c25c1fe9e23101c986da1df5f1988b6
@@@ -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)) {
Simple merge