Re: [PATCH 1/2] usb: typec: ucsi: Check if power role change actually happened before handling
From: Heikki Krogerus
Date: Tue May 19 2026 - 10:23:27 EST
On Tue, May 19, 2026 at 05:14:15PM +0300, Heikki Krogerus wrote:
> On Tue, May 19, 2026 at 06:41:39PM +0700, Myrrh Periwinkle wrote:
> > The CrOS EC may send a connector status change event with the power
> > 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>
>
> Reviewed-by: Heikki Krogerus <heikki.krogerus@xxxxxxxxxxxxxxx>
Hold on. Shouldn't this actually be fixed in that EC code?
thanks,
--
heikki