From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Alexander Stein <alexander.stein@ew.tq-group.com>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Markus Niebel <Markus.Niebel@ew.tq-group.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH 1/1] usb: dwc3: let role switch handle initial state
Date: Tue, 31 Oct 2023 23:28:53 +0000 [thread overview]
Message-ID: <20231031232845.owfngqqaz6xq6hzt@synopsys.com> (raw)
In-Reply-To: <2176034.Icojqenx9y@steina-w>
On Wed, Oct 25, 2023, Alexander Stein wrote:
> Hi,
>
> Am Samstag, 21. Oktober 2023, 00:43:39 CEST schrieb Thinh Nguyen:
> > Hi,
> >
> > On Tue, Oct 17, 2023, Alexander Stein wrote:
> >
> > > From: Markus Niebel <Markus.Niebel@ew.tq-group.com>
> > >
> > > When we have a role switch device attached, we should not configure our
> > > initial role. Leave this up to the role switch device, that should
> > > detect and signal the initial role.
> > >
> > > This fixes situations where a Type-A plug is connected already when the
> > > driver is loaded but the default role is set to none or device. In this
> > > case only an disconnect / reconnect gets the correct mode.
> >
> >
> > If the default role is none, why isn't there a notification to update
> > the role on initialization from the connector? The current role should
> > not be none.
>
> dwc->role_switch_default_mode can only be none if the DT is misconfigured,
> e.g. role-switch-default-mode = "";
No, I was referring to the current role, which is detected after
initialization. The current role should not be none. If the connector
has not notified the controller of the current role, the dwc3 driver
would set the controller to either host or device mode. The connector
can notify the dwc3 driver if it detected the current role on its
initialization.
>
> Calls to usb_role_switch_set_role() from usb role switch drivers will not
> affect dwc->role_switch_default_mode.
> I'm wondering if checking for a misconfigured DT is sensible. But this will be
> detected by 'make dtbs_check'.
>
I see that you just pushed out the fix patch for the actual issue, which
looks more reasonable.
Thanks,
Thinh
prev parent reply other threads:[~2023-10-31 23:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 5:57 [PATCH 1/1] usb: dwc3: let role switch handle initial state Alexander Stein
2023-10-20 22:43 ` Thinh Nguyen
2023-10-25 8:05 ` Alexander Stein
2023-10-31 23:28 ` Thinh Nguyen [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=20231031232845.owfngqqaz6xq6hzt@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=Markus.Niebel@ew.tq-group.com \
--cc=alexander.stein@ew.tq-group.com \
--cc=gregkh@linuxfoundation.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