From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3FEA93FFF8E for ; Fri, 5 Jun 2026 15:03:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780671787; cv=none; b=rlOhSHKBo/J91BPxTkp8NieeT8iiOTUojbfkOlPpse4f/r/XMcgr7dB1NSikTxNscmQgRlwx1VwlQfefNmXKW0uY6RIdbUKlN6prIPFtXEfcsRt2/+e2vzuL1zday+vUN3UNcTrJdwSsgPI1oqarv4y9PTa0WeSN3DQELJYYIgU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780671787; c=relaxed/simple; bh=jBSWk1VMyMW8xeXJPcgGmqihuaem5ZBpaRK2GyHBkWI=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=ScBe+0aEjB4iMUBPej71U8JxeV6iwySNHRKP58fL6ocg+PSy1gYPSPrD2BDzPQquJZJMzZL3dTwIfe1W+qPLVMHKtbUoiTVlgM7hV0qM2F1JpWkBE1fi3AebYlo3Usm2sy8FXBPgEjQQ7W5cSZpnTSyz8ZBkT1rVK8sovYb9ykI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OyzWtKWL; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="OyzWtKWL" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CAA81F00893; Fri, 5 Jun 2026 15:03:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780671786; bh=Zvzle07geRBVG25mtqmjOkCSVJqVaEcuplLHUAFhxUQ=; h=Subject:To:Cc:From:Date; b=OyzWtKWLYsJ/ADleoG0p+bnvjJ3WaSfpxkyFrTdmJ26krwHF7exG5Lyr+z+cfRMte VpotoIOIJmcwy6+6kAnQGRp//zdCZGwkXuEB9QxQZ4GelWKW1dyrAtzsn7pq7ng587 2oyVE9diQrbsQS1wBF+8Sbsy/3OeOqsznqSSB5z4= Subject: FAILED: patch "[PATCH] usb: typec: ucsi: Don't update power_supply on power role" failed to apply to 5.10-stable tree To: myrrhperiwinkle@qtmlabs.xyz,gregkh@linuxfoundation.org,senozhatsky@chromium.org,stable@kernel.org Cc: From: Date: Fri, 05 Jun 2026 08:02:59 +0200 Message-ID: <2026060559-detective-buckskin-3910@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y git checkout FETCH_HEAD git cherry-pick -x d98d413ca65d0790a8f3695d0a5845538958ab84 # git commit -s git send-email --to '' --in-reply-to '2026060559-detective-buckskin-3910@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From d98d413ca65d0790a8f3695d0a5845538958ab84 Mon Sep 17 00:00:00 2001 From: Myrrh Periwinkle Date: Tue, 19 May 2026 18:41:40 +0700 Subject: [PATCH] usb: typec: ucsi: Don't update power_supply on power role change if not connected We only need to update the power_supply on power role change if the port is connected, because otherwise the online status should be the same for both cases. Cc: stable Fixes: 7616f006db07 ("usb: typec: ucsi: Update power_supply on power role change") Signed-off-by: Myrrh Periwinkle Reported-and-tested-by: Sergey Senozhatsky Link: https://patch.msgid.link/20260519-ucsi-fix-2-v1-2-6f1239535187@qtmlabs.xyz Signed-off-by: Greg Kroah-Hartman diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c index 53c101bd48e2..61cb24ed820f 100644 --- a/drivers/usb/typec/ucsi/ucsi.c +++ b/drivers/usb/typec/ucsi/ucsi.c @@ -1308,7 +1308,12 @@ static void ucsi_handle_connector_change(struct work_struct *work) if ((change & UCSI_CONSTAT_POWER_DIR_CHANGE) && role != prev_role) { typec_set_pwr_role(con->port, role); - ucsi_port_psy_changed(con); + + /* Some power_supply properties vary depending on the power direction when + * connected + */ + if (UCSI_CONSTAT(con, CONNECTED)) + ucsi_port_psy_changed(con); /* Complete pending power role swap */ if (!completion_done(&con->complete))