Re: [PATCH 1/2] usb: typec: ucsi: Check if power role change actually happened before handling
From: Myrrh Periwinkle
Date: Tue May 19 2026 - 10:32:22 EST
Hello,
On 5/19/26 9:22 PM, Heikki Krogerus wrote:
On Tue, May 19, 2026 at 05:14:15PM +0300, Heikki Krogerus wrote:I'm not responsible for the CrOS EC and the only alternative proposed thus far is a full revert: https://lore.kernel.org/all/2026051935-flashing-relearn-8444@gregkh/
On Tue, May 19, 2026 at 06:41:39PM +0700, Myrrh Periwinkle wrote:Hold on. Shouldn't this actually be fixed in that EC code?
The CrOS EC may send a connector status change event with the powerReviewed-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
direction changed flag set even if the power direction hasn't actually
changed after initiating a SET_PDR command internally [1]. In practice
this happens on every system suspend due to other changes performed by
the EC [2][3][4], causing suspend to fail.
Fix this by checking if the power role change actually happened before
handling it.
[1]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/subsys/pd_controller/pdc_power_mgmt.c;l=1689;drc=2d5a1cffce4e5ac8a39442cb3b764d2d5e1cf794
[2]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/subsys/pd_controller/pdc_power_mgmt.c;l=3923;drc=2d5a1cffce4e5ac8a39442cb3b764d2d5e1cf794
[3]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/subsys/pd_controller/pdc_power_mgmt.c;l=5094;drc=2d5a1cffce4e5ac8a39442cb3b764d2d5e1cf794
[4]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/zephyr/subsys/pd_controller/pdc_power_mgmt.c;l=2229;drc=2d5a1cffce4e5ac8a39442cb3b764d2d5e1cf794
Cc: stable@xxxxxxxxxxxxxxx
Fixes: 7616f006db07 ("usb: typec: ucsi: Update power_supply on power role change")
Signed-off-by: Myrrh Periwinkle <myrrhperiwinkle@xxxxxxxxxxx>
thanks,