From: RD Babiera <rdbabiera@google.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: gregkh@linuxfoundation.org, badhri@google.com,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/2] usb: typec: class: add typec_get_data_role symbol
Date: Wed, 3 Sep 2025 12:47:32 -0400 [thread overview]
Message-ID: <CALzBnUEe5cp1672OSywK1w_cP--+731tKDbOmqjBt2NghK2OGw@mail.gmail.com> (raw)
In-Reply-To: <aLAk3MJuso1w4Kkl@kuha.fi.intel.com>
On Thu, Aug 28, 2025 at 5:44 AM Heikki Krogerus
<heikki.krogerus@linux.intel.com> wrote:
> > Alt Mode drivers are responsible for sending Enter Mode through the TCPM,
> > but only a DFP is allowed to send Enter Mode. typec_get_data_role gets
> > the port's data role, which can then be used in altmode drivers via
> > typec_altmode_get_data_role to know if Enter Mode should be sent.
> The functions are okay by me, but is the above statement correct?
> Are you mixing power role and data role?
The PD Specification lists the DFP as being the USB host when USB
Communication is supported while acting as a DFP; it gives
a charger being a DFP and not supporting USB Communication as an
example.
> > @@ -172,6 +172,18 @@ typec_altmode_get_svdm_version(struct typec_altmode *altmode)
> > return typec_get_negotiated_svdm_version(typec_altmode2port(altmode));
> > }
> >
> > +/**
> > + * typec_altmode_get_data_role - Get port data role. Alt Mode drivers should only
> > + * issue Enter Mode through the port if they are the DFP.
>
> The second sentence should go below. But I'm not sure it's correct.
The kernel-doc comment guide agrees with that statement. I'll change it,
thanks for the heads up!
---
RD
next prev parent reply other threads:[~2025-09-03 16:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-21 20:38 [PATCH v1 0/2] usb: typec: altmodes/displayport: add port data role handling support RD Babiera
2025-08-21 20:38 ` [PATCH v1 1/2] usb: typec: class: add typec_get_data_role symbol RD Babiera
2025-08-28 9:43 ` Heikki Krogerus
2025-09-03 16:47 ` RD Babiera [this message]
2025-08-21 20:38 ` [PATCH v1 2/2] usb: typec: altmodes/displayport: do not enter mode if port is the UFP RD Babiera
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=CALzBnUEe5cp1672OSywK1w_cP--+731tKDbOmqjBt2NghK2OGw@mail.gmail.com \
--to=rdbabiera@google.com \
--cc=badhri@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.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;
as well as URLs for NNTP newsgroup(s).