Re: [PATCH] usb: typec: mux: gpio-sbu-mux: fix SBU path not enabled on orientation change

Peng Fan <[email protected]>
Newsgroups org.kernel.vger.linux-usb,org.kernel.vger.linux-kernel
Message-ID <aoKO1WGHs4wgF4gH@shlinux89>
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 <[email protected]>
>
>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 <[email protected]>
>---
> 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 <[email protected]>
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.