Re: [PATCH] platform/chrome: cros_ec: Always expose last resume result

From: Stephen Boyd
Date: Sat Jun 11 2022 - 02:17:51 EST


Quoting Guenter Roeck (2022-06-10 18:40:33)
> On Fri, Jun 10, 2022 at 3:37 PM Stephen Boyd <swboyd@xxxxxxxxxxxx> wrote:
> > diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cros_ec.c
> > index b3e94cdf7d1a..881d3ad09be0 100644
> > --- a/drivers/platform/chrome/cros_ec.c
> > +++ b/drivers/platform/chrome/cros_ec.c
> > @@ -135,10 +135,10 @@ static int cros_ec_sleep_event(struct cros_ec_device *ec_dev, u8 sleep_event)
> > buf.msg.command = EC_CMD_HOST_SLEEP_EVENT;
> >
> > ret = cros_ec_cmd_xfer_status(ec_dev, &buf.msg);
> > -
> > - /* For now, report failure to transition to S0ix with a warning. */
> > + /* Report failure to transition to system wide suspend with a warning. */
> > if (ret >= 0 && ec_dev->host_sleep_v1 &&
> > - (sleep_event == HOST_SLEEP_EVENT_S0IX_RESUME)) {
> > + (sleep_event == HOST_SLEEP_EVENT_S0IX_SUSPEND ||
> > + sleep_event == HOST_SLEEP_EVENT_S3_RESUME)) {
>
> I am sure I am missing something, but the description doesn't explain
> (to me) the switch from HOST_SLEEP_EVENT_S0IX_RESUME to
> HOST_SLEEP_EVENT_S0IX_SUSPEND.

You didn't miss anything.