mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Joonhoe Kim <26rote@gmail.com>
Cc: gregkh@linuxfoundation.org, neil.armstrong@linaro.org,
	dmitry.baryshkov@oss.qualcomm.com, tvlad744@gmail.com,
	linux-usb@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] usb: typec: ucsi: Leave the mux to the altmode driver for alt mode partners
Date: Fri, 6 Nov 2026 17:41:50 +0100	[thread overview]
Message-ID: <au4DThRaGmNzZ0HU@black.igk.intel.com> (raw)
In-Reply-To: <20261103135046.1654-1-26rote@gmail.com>

On Tue, Nov 03, 2026 at 10:50:46PM +0900, Joonhoe Kim wrote:
> Commit 25a2bc21c863 ("usb: typec: ucsi: call typec_set_mode on
> non-altmode partner change") set TYPEC_STATE_USB only when the partner
> flags were exactly USB, so that the altmode drivers set up the
> switches, muxes and retimers for alt mode partners. Commit 226ff2e681d0
> ("usb: typec: ucsi: Convert connector specific commands to bitmaps")
> turned that into a test of the USB bit alone, so a partner that
> reports both USB and alt mode now gets TYPEC_STATE_USB as well.
> 
> On pmic_glink platforms the altmode driver programs the same mux chain,
> and the two notifications are not ordered. When the UCSI connector
> change comes last, an FSA4480 switches the SBU lines off, the
> DisplayPort AUX channel stops working and the sink is never detected.
> On the Lenovo Y700 Gen 5 (TB323FU, Kaanapali) this happens when a
> DisplayPort sink is plugged in during system suspend.
> 
> Set TYPEC_STATE_USB only when the partner does not report alt mode.
> USB4 partners keep TYPEC_STATE_USB, as they do now.
> 
> Fixes: 226ff2e681d0 ("usb: typec: ucsi: Convert connector specific commands to bitmaps")
> Cc: stable@vger.kernel.org
> Signed-off-by: Joonhoe Kim <26rote@gmail.com>

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>

> ---
>  drivers/usb/typec/ucsi/ucsi.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
> index 2f9adf4f8bde..395554ba0312 100644
> --- a/drivers/usb/typec/ucsi/ucsi.c
> +++ b/drivers/usb/typec/ucsi/ucsi.c
> @@ -1356,7 +1356,8 @@ static void ucsi_partner_change(struct ucsi_connector *con)
>  			typec_set_mode(con->port, TYPEC_MODE_AUDIO);
>  			break;
>  		default:
> -			if (UCSI_CONSTAT(con, PARTNER_FLAG_USB))
> +			if (UCSI_CONSTAT(con, PARTNER_FLAG_USB) &&
> +			    !UCSI_CONSTAT(con, PARTNER_FLAG_ALT_MODE))
>  				typec_set_mode(con->port, TYPEC_STATE_USB);
>  		}
>  
> 
> base-commit: 7649ba73f9e7e1e04d0b46213e39c79ae09dd55c
> -- 
> 2.43.0

-- 
heikki

      reply	other threads:[~2026-11-06 16:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 13:50 Joonhoe Kim
2026-11-06 16:41 ` 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=au4DThRaGmNzZ0HU@black.igk.intel.com \
    --to=heikki.krogerus@linux.intel.com \
    --cc=26rote@gmail.com \
    --cc=dmitry.baryshkov@oss.qualcomm.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=stable@vger.kernel.org \
    --cc=tvlad744@gmail.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

all inboxes | Powered by JetHome®