From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Myrrh Periwinkle <myrrhperiwinkle@qtmlabs.xyz>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH] usb: typec: ucsi: Update power_supply on power role change
Date: Mon, 21 Jul 2025 12:48:03 +0300 [thread overview]
Message-ID: <aH4M074PasIlWzTQ@kuha.fi.intel.com> (raw)
In-Reply-To: <20250721-fix-ucsi-pwr-dir-notify-v1-1-e53d5340cb38@qtmlabs.xyz>
On Mon, Jul 21, 2025 at 01:32:51PM +0700, Myrrh Periwinkle wrote:
> The current power direction of an USB-C port also influences the
> power_supply's online status, so a power role change should also update
> the power_supply.
>
> Fixes an issue on some systems where plugging in a normal USB device in
> for the first time after a reboot will cause upower to erroneously
> consider the system to be connected to AC power.
>
> Cc: stable@vger.kernel.org
> Fixes: 0e6371fbfba3 ("usb: typec: ucsi: Report power supply changes")
> Signed-off-by: Myrrh Periwinkle <myrrhperiwinkle@qtmlabs.xyz>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/usb/typec/ucsi/ucsi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
> index 01ce858a1a2b3466155db340e213c767d1e79479..8ff31963970bb384e28b460e5307e32cf421396b 100644
> --- a/drivers/usb/typec/ucsi/ucsi.c
> +++ b/drivers/usb/typec/ucsi/ucsi.c
> @@ -1246,6 +1246,7 @@ static void ucsi_handle_connector_change(struct work_struct *work)
>
> if (change & UCSI_CONSTAT_POWER_DIR_CHANGE) {
> typec_set_pwr_role(con->port, role);
> + ucsi_port_psy_changed(con);
>
> /* Complete pending power role swap */
> if (!completion_done(&con->complete))
>
> ---
> base-commit: 89be9a83ccf1f88522317ce02f854f30d6115c41
> change-id: 20250721-fix-ucsi-pwr-dir-notify-8a953aab42e5
>
> Best regards,
> --
> Myrrh Periwinkle <myrrhperiwinkle@qtmlabs.xyz>
--
heikki
prev parent reply other threads:[~2025-07-21 9:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-21 6:32 Myrrh Periwinkle
2025-07-21 9:48 ` 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=aH4M074PasIlWzTQ@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=myrrhperiwinkle@qtmlabs.xyz \
--cc=stable@vger.kernel.org \
/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®