From: Andrei Kuchynski <akuchynski@chromium.org>
To: Tzung-Bi Shih <tzungbi@kernel.org>
Cc: Jameson Thies <jthies@google.com>,
Benson Leung <bleung@chromium.org>,
Abhishek Pandit-Subedi <abhishekpandit@chromium.org>,
Guenter Roeck <groeck@chromium.org>,
chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] platform/chrome: cros_ec_typec: Reorder altmode registration
Date: Tue, 20 Oct 2026 11:13:44 +0200 [thread overview]
Message-ID: <CAMMMRMdpOidJsFdSyscZ23jZ9XXqhEn_Hyc4P6+e3JVM3cDbDg@mail.gmail.com> (raw)
In-Reply-To: <atDDunhd_1mucOVh@google.com>
On Thu, Oct 15, 2026 at 2:14 PM Tzung-Bi Shih <tzungbi@kernel.org> wrote:
>
> On Thu, Oct 08, 2026 at 01:40:56PM +0000, Andrei Kuchynski wrote:
> > @@ -406,17 +406,6 @@ static int cros_typec_register_port_altmodes(struct cros_typec_data *typec,
> > struct typec_altmode_desc desc;
> > struct typec_altmode *amode;
> >
> > - /* All PD capable CrOS devices are assumed to support DP altmode. */
> > - memset(&desc, 0, sizeof(desc));
> > - desc.svid = USB_TYPEC_DP_SID;
> > - desc.mode = USB_TYPEC_DP_MODE;
> > - desc.vdo = DP_PORT_VDO;
> > - amode = cros_typec_register_displayport(port, &desc,
> > - typec->ap_driven_altmode);
> > - if (IS_ERR(amode))
> > - return PTR_ERR(amode);
> > - port->port_altmode[CROS_EC_ALTMODE_DP] = amode;
> > -
> > /*
> > * Register TBT compatibility alt mode. The EC will not enter the mode
> > * if it doesn't support it and it will not enter automatically by
> > @@ -433,6 +422,17 @@ static int cros_typec_register_port_altmodes(struct cros_typec_data *typec,
> > port->port_altmode[CROS_EC_ALTMODE_TBT] = amode;
> > }
> >
> > + /* All PD capable CrOS devices are assumed to support DP altmode. */
> > + memset(&desc, 0, sizeof(desc));
> > + desc.svid = USB_TYPEC_DP_SID;
> > + desc.mode = USB_TYPEC_DP_MODE;
> > + desc.vdo = DP_PORT_VDO;
> > + amode = cros_typec_register_displayport(port, &desc,
> > + typec->ap_driven_altmode);
> > + if (IS_ERR(amode))
> > + return PTR_ERR(amode);
> > + port->port_altmode[CROS_EC_ALTMODE_DP] = amode;
> > +
>
> It deserves a code comment to note that the registration order dictates
> the priorities.
Thanks for reviewing.
I will add a comment explaining the registration order priority in v3.
Thanks,
Andrei
prev parent reply other threads:[~2026-10-20 9:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 13:40 [PATCH v2 0/2] USB Type-C mode selection Andrei Kuchynski
2026-10-08 13:40 ` [PATCH v2 1/2] platform/chrome: cros_ec_typec: Enforce priority-based " Andrei Kuchynski
2026-10-15 12:15 ` Tzung-Bi Shih
2026-10-20 9:12 ` Andrei Kuchynski
2026-10-08 13:40 ` [PATCH v2 2/2] platform/chrome: cros_ec_typec: Reorder altmode registration Andrei Kuchynski
2026-10-15 12:14 ` Tzung-Bi Shih
2026-10-20 9:13 ` Andrei Kuchynski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAMMMRMdpOidJsFdSyscZ23jZ9XXqhEn_Hyc4P6+e3JVM3cDbDg@mail.gmail.com \
--to=akuchynski@chromium.org \
--cc=abhishekpandit@chromium.org \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=groeck@chromium.org \
--cc=jthies@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tzungbi@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®