* [PATCH] usb: typec: mux: gpio-sbu-mux: fix SBU path not enabled on orientation change
@ 2026-08-17 2:11 Peng Fan (OSS)
2026-08-17 4:32 ` Peng Fan
0 siblings, 1 reply; 2+ messages in thread
From: Peng Fan (OSS) @ 2026-08-17 2:11 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman, Bjorn Andersson
Cc: Francesco Dolcini, linux-usb, linux-kernel, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
The swapped state is updated, but the mux is never enabled when
orientation is set to TYPEC_ORIENTATION_NORMAL or
TYPEC_ORIENTATION_REVERSE, which means the SBU mux enable GPIO would
never be asserted when a cable is plugged in with a known orientation,
leaving the SBU lines disconnected.
Fix by setting enabled=true in both NORMAL and REVERSE orientation
cases, mirroring the disable in TYPEC_ORIENTATION_NONE.
Fixes: 065ded319d39 ("usb: typec: mux: Introduce GPIO-based SBU mux")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/usb/typec/mux/gpio-sbu-mux.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/typec/mux/gpio-sbu-mux.c b/drivers/usb/typec/mux/gpio-sbu-mux.c
index 1834f1a2dd9d..4de7456794ad 100644
--- a/drivers/usb/typec/mux/gpio-sbu-mux.c
+++ b/drivers/usb/typec/mux/gpio-sbu-mux.c
@@ -40,9 +40,11 @@ static int gpio_sbu_switch_set(struct typec_switch_dev *sw,
enabled = false;
break;
case TYPEC_ORIENTATION_NORMAL:
+ enabled = true;
swapped = false;
break;
case TYPEC_ORIENTATION_REVERSE:
+ enabled = true;
swapped = true;
break;
}
---
base-commit: 4477a78374a57c3809b172ad30cceabda48c47c6
change-id: 20260817-typec-mux-d0e148129c08
Best regards,
--
Peng Fan <peng.fan@nxp.com>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] usb: typec: mux: gpio-sbu-mux: fix SBU path not enabled on orientation change
2026-08-17 2:11 [PATCH] usb: typec: mux: gpio-sbu-mux: fix SBU path not enabled on orientation change Peng Fan (OSS)
@ 2026-08-17 4:32 ` Peng Fan
0 siblings, 0 replies; 2+ messages in thread
From: Peng Fan @ 2026-08-17 4:32 UTC (permalink / raw)
To: Heikki Krogerus, Greg Kroah-Hartman, Bjorn Andersson
Cc: Francesco Dolcini, linux-usb, linux-kernel, Peng Fan
Ignore this patch. The patch is not correct.
Thanks
Peng.
On Mon, Aug 17, 2026 at 10:11:07AM +0800, Peng Fan (OSS) wrote:
>From: Peng Fan <peng.fan@nxp.com>
>
>The swapped state is updated, but the mux is never enabled when
>orientation is set to TYPEC_ORIENTATION_NORMAL or
>TYPEC_ORIENTATION_REVERSE, which means the SBU mux enable GPIO would
>never be asserted when a cable is plugged in with a known orientation,
>leaving the SBU lines disconnected.
>
>Fix by setting enabled=true in both NORMAL and REVERSE orientation
>cases, mirroring the disable in TYPEC_ORIENTATION_NONE.
>
>Fixes: 065ded319d39 ("usb: typec: mux: Introduce GPIO-based SBU mux")
>Signed-off-by: Peng Fan <peng.fan@nxp.com>
>---
> drivers/usb/typec/mux/gpio-sbu-mux.c | 2 ++
> 1 file changed, 2 insertions(+)
>
>diff --git a/drivers/usb/typec/mux/gpio-sbu-mux.c b/drivers/usb/typec/mux/gpio-sbu-mux.c
>index 1834f1a2dd9d..4de7456794ad 100644
>--- a/drivers/usb/typec/mux/gpio-sbu-mux.c
>+++ b/drivers/usb/typec/mux/gpio-sbu-mux.c
>@@ -40,9 +40,11 @@ static int gpio_sbu_switch_set(struct typec_switch_dev *sw,
> enabled = false;
> break;
> case TYPEC_ORIENTATION_NORMAL:
>+ enabled = true;
> swapped = false;
> break;
> case TYPEC_ORIENTATION_REVERSE:
>+ enabled = true;
> swapped = true;
> break;
> }
>
>---
>base-commit: 4477a78374a57c3809b172ad30cceabda48c47c6
>change-id: 20260817-typec-mux-d0e148129c08
>
>Best regards,
>--
>Peng Fan <peng.fan@nxp.com>
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-17 4:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-17 2:11 [PATCH] usb: typec: mux: gpio-sbu-mux: fix SBU path not enabled on orientation change Peng Fan (OSS)
2026-08-17 4:32 ` Peng Fan
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.