From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: "François Scala" <francois@scala.name>
Cc: linux-usb@vger.kernel.org
Subject: Re: [PATCH] usb: typec: altmode: Fix altmode to handle multiple parners
Date: Thu, 2 Apr 2026 16:26:31 +0300 [thread overview]
Message-ID: <ac5uh_3N3q61efIb@kuha> (raw)
In-Reply-To: <20260402120433.22967-1-francois@scala.name>
Hi,
On Thu, Apr 02, 2026 at 02:04:32PM +0200, François Scala wrote:
> From: François Scala <francois@scala.name>
>
> The partner field in the altmode struct is a single pointer and the sysfs
> symlink uses a fixed name. This cause an error when a second partner is
> registered.
>
> sysfs: cannot create duplicate filename '/devices/platform/USBC000:00/typec/port0/port0.0/partner'
I think what you seeing here is either a bug in our ucsi driver, or
(more likely) a problem in the firmware.
> The field is replaced by an array of pointers and the symlink use the
> device name to avoid conflict.
>
> /sys/devices/platform/USBC000:00/typec/port0/port0.0/
> lrwxrwxrwx 1 root root 0 Apr 2 09:12 port0-partner.0 -> ../port0-partner/port0-partner.0
> lrwxrwxrwx 1 root root 0 Apr 2 09:12 port0-partner.1 -> ../port0-partner/port0-partner.1
No. You can not have more than a single partner per mode. Let's figure
out the root issue. Please check the svids of the partner altmodes:
grep . /sys/class/typec/port0-partner/port0-partner.*/svid
Then provide the trace output from the ucsi driver, dmesg output
(full), and also acpidump of your system. The ucsi trace you can
get like this (assuming you have the debugfs mounted at
/sys/kernel/debug):
cd /sys/kernel/debug/tracing
echo 1 > events/ucsi/enable
# plug-in your device
# wait for a few seconds
cat trace
For acpidump you need the acpica-tools installed:
acpidump -o my_acpi.dump
thanks,
--
heikki
next prev parent reply other threads:[~2026-04-02 13:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-02 12:04 [PATCH] usb: typec: altmode: Fix altmode to handle multiple parners François Scala
2026-04-02 12:18 ` Greg KH
2026-04-02 12:27 ` François Scala
2026-04-02 13:35 ` Greg KH
2026-04-02 13:26 ` Heikki Krogerus [this message]
2026-04-02 18:10 ` François Scala
2026-04-07 12:17 ` Heikki Krogerus
[not found] ` <d627d2fe-415f-4489-b4fa-ec0575a33239@scala.name>
2026-04-08 10:00 ` Heikki Krogerus
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=ac5uh_3N3q61efIb@kuha \
--to=heikki.krogerus@linux.intel.com \
--cc=francois@scala.name \
--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