From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: jens.glathe@oldschoolsolutions.biz
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Sebastian Reichel <sebastian.reichel@collabora.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Revert "usb: typec: mux: avoid duplicated mux switches"
Date: Mon, 1 Jun 2026 16:44:14 +0300 [thread overview]
Message-ID: <ah2Mrs6S2cwwcgza@kuha> (raw)
In-Reply-To: <20260530-typc-mux-modeset-v1-1-64b0281e2cd6@oldschoolsolutions.biz>
On Sat, May 30, 2026 at 10:20:22AM +0200, Jens Glathe via B4 Relay wrote:
> From: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
>
> This reverts commit b145c3f29d62f71cc9d2d714e2d4ae4c8d3f863d.
>
> The deduplication logic appears to cause issues with separate
> SBU muxes. The mode-switch call on these (like gpio-sbu-mux)
> never appeared, so no successful mode-switch happened. The more
> high-end Parade PS883X redrivers are not affected due to being
> retimer-switch. The revert fixes dp altmode mode-switch for both.
>
> Tested on:
> Lenovo Thinkbook 16 G7 QOY
> Lenovo Ideapad 5 2in1 14Q8X9
> Microsoft Windows Dev Kit 2023 (Blackrock)
> Lenovo Thinkpad T14s G6
>
> Fixes: b145c3f29d62 ("usb: typec: mux: avoid duplicated mux switches")
>
> Signed-off-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/mux.c | 13 +------------
> 1 file changed, 1 insertion(+), 12 deletions(-)
>
> diff --git a/drivers/usb/typec/mux.c b/drivers/usb/typec/mux.c
> index db5e4a4c0a996..9b908c46bd7df 100644
> --- a/drivers/usb/typec/mux.c
> +++ b/drivers/usb/typec/mux.c
> @@ -275,9 +275,7 @@ static int mux_fwnode_match(struct device *dev, const void *fwnode)
> static void *typec_mux_match(const struct fwnode_handle *fwnode,
> const char *id, void *data)
> {
> - struct typec_mux_dev **mux_devs = data;
> struct device *dev;
> - int i;
>
> /*
> * Device graph (OF graph) does not give any means to identify the
> @@ -293,14 +291,6 @@ static void *typec_mux_match(const struct fwnode_handle *fwnode,
> dev = class_find_device(&typec_mux_class, NULL, fwnode,
> mux_fwnode_match);
>
> - /* Skip duplicates */
> - for (i = 0; i < TYPEC_MUX_MAX_DEVS; i++)
> - if (to_typec_mux_dev(dev) == mux_devs[i]) {
> - put_device(dev);
> - return NULL;
> - }
> -
> -
> return dev ? to_typec_mux_dev(dev) : ERR_PTR(-EPROBE_DEFER);
> }
>
> @@ -326,8 +316,7 @@ struct typec_mux *fwnode_typec_mux_get(struct fwnode_handle *fwnode)
> return ERR_PTR(-ENOMEM);
>
> count = fwnode_connection_find_matches(fwnode, "mode-switch",
> - (void **)mux_devs,
> - typec_mux_match,
> + NULL, typec_mux_match,
> (void **)mux_devs,
> ARRAY_SIZE(mux_devs));
> if (count <= 0) {
>
> ---
> base-commit: 7da7f07112610a520567421dd2ffcb51beaefbcc
> change-id: 20260530-typc-mux-modeset-e5f8a38a100c
>
> Best regards,
> --
> Jens Glathe <jens.glathe@oldschoolsolutions.biz>
>
--
heikki
prev parent reply other threads:[~2026-06-01 13:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-30 8:20 [PATCH] Revert "usb: typec: mux: avoid duplicated mux switches" Jens Glathe via B4 Relay
2026-05-30 8:20 ` Jens Glathe
2026-06-01 13:44 ` Heikki Krogerus [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=ah2Mrs6S2cwwcgza@kuha \
--to=heikki.krogerus@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jens.glathe@oldschoolsolutions.biz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sebastian.reichel@collabora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.