[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240904150522.0410150f@canb.auug.org.au>
Date: Wed, 4 Sep 2024 15:05:22 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Greg KH <greg@...ah.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>, Heikki Krogerus
<heikki.krogerus@...ux.intel.com>, Linux Kernel Mailing List
<linux-kernel@...r.kernel.org>, Linux Next Mailing List
<linux-next@...r.kernel.org>
Subject: linux-next: manual merge of the usb tree with the usb.current tree
Hi all,
Today's linux-next merge of the usb tree got a conflict in:
drivers/usb/typec/ucsi/ucsi.c
between commit:
87eb3cb4ec61 ("usb: typec: ucsi: Fix cable registration")
from the usb.current tree and commit:
73910c511b1a ("usb: typec: ucsi: Only assign the identity structure if the PPM supports it")
from the usb tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc drivers/usb/typec/ucsi/ucsi.c
index 17155ed17fdf,f0b5867048e2..000000000000
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@@ -993,11 -929,12 +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)) {
@@@ -1094,8 -1009,10 +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)) {
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists