public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
To: Xu Yang <xu.yang_2@nxp.com>
Cc: badhri@google.com, heikki.krogerus@linux.intel.com,
	gregkh@linuxfoundation.org, dsimic@manjaro.org,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	imx@lists.linux.dev, jun.li@nxp.com
Subject: Re: [PATCH] Revert "tcpm: allow looking for role_sw device in the main node"
Date: Thu, 5 Mar 2026 17:36:08 +0100	[thread overview]
Message-ID: <cb73e1ac-649e-45cb-be5e-3fdd73dce7a0@collabora.com> (raw)
In-Reply-To: <xcfp6d2ma2j2xnsmifpvufofovqixwije7ld6332hg3zeeyxip@mocrjvsmjlqh>

Hi Xu,

Le 05/03/2026 à 10:40, Xu Yang a écrit :
> On Fri, Feb 27, 2026 at 04:45:30PM +0100, Arnaud Ferraris wrote:
>> Hi Xu,
>>
>> Le 25/02/2026 à 03:57, Xu Yang a écrit :
>>> Hi Arnaud,
>>>
>>> On Tue, Feb 24, 2026 at 12:33:33PM +0100, Arnaud Ferraris wrote:
>>>> Hi,
>>>>
>>>> Le 24/02/2026 à 12:01, Xu Yang a écrit :
>>>>> This reverts commit 1366cd228b0c67b60a2c0c26ef37fe9f7cfedb7f.
>>>>
>>>> I believe a plain revert isn't the right solution here, as we'll get to the
>>>> same point as we were before 1366cd228b0c, where some devices stopped
>>>> working properly with newer kernels.
>>>
>>> I don't think 1366cd228b0c fix the real root problem because the description
>>> should be wrong in the commit message. If -EPROBE_DEFER is returned by
>>> fwnode_usb_role_switch_get(), the ports node should be in connector node
>>> instead of tcpc node. However, you get the error when ports in tcpc node.
>>>
>>> Could you double check the issue, so we can find a proper solution and avoid
>>> the further regression?
>>
>> Sure, I'll come up with more details asap, either tomorrow or early next
>> week.
> 
> Do you have any updates about this?

I do, sorry it took so long...

So fwnode_usb_role_switch_get() does indeed return -EPROBE_DEFER, then
keeps doing so on later attempts if I revert my patch. However,
usb_role_switch_get() succeeds on first try.

Please note that:
1. I don't understand much (if any) of the Linux typec stack, and only
    noticed 2d8713f807 broke my device, hence my attempted fix
2. said device is the PinePhone Pro, using an out-of-tree dts (and many
    drivers) from https://codeberg.org/megi/linux

The proper solution likely lies somewhere in the "get proper drivers
and upstream dts for this device" land, although I definitely can't
commit to this.

I think saving the fwnode_usb_role_switch_get() return value and
restoring it if usb_role_switch_get() fails would be a decent
workaround, although I'm definitely open to suggestions.

Feel free to let me know if there's any other test I could run, I'll do
my best at replying promptly.

Best regards,
Arnaud

> 
> Thanks,
> Xu Yang


  reply	other threads:[~2026-03-05 16:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24 11:01 [PATCH] Revert "tcpm: allow looking for role_sw device in the main node" Xu Yang
2026-02-24 11:33 ` Arnaud Ferraris
2026-02-25  2:57   ` Xu Yang
2026-02-27 15:45     ` Arnaud Ferraris
2026-03-05  9:40       ` Xu Yang
2026-03-05 16:36         ` Arnaud Ferraris [this message]
2026-03-06  9:52           ` Xu Yang
2026-03-06 16:24             ` Arnaud Ferraris
2026-03-09  7:36               ` Xu Yang

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=cb73e1ac-649e-45cb-be5e-3fdd73dce7a0@collabora.com \
    --to=arnaud.ferraris@collabora.com \
    --cc=badhri@google.com \
    --cc=dsimic@manjaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=imx@lists.linux.dev \
    --cc=jun.li@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=xu.yang_2@nxp.com \
    /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