All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tzung-Bi Shih <tzungbi@kernel.org>
To: Brady Norander <bradynorander@gmail.com>
Cc: chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org,
	Benson Leung <bleung@chromium.org>,
	Guenter Roeck <groeck@chromium.org>
Subject: Re: [PATCH] platform/chrome: cros_ec_lightbar: Check if ec supports suspend commands
Date: Mon, 27 Oct 2025 03:54:02 +0000	[thread overview]
Message-ID: <aP7s2ib_nUIZ3X5O@google.com> (raw)
In-Reply-To: <20251023234239.23882-2-bradynorander@gmail.com>

On Thu, Oct 23, 2025 at 07:42:40PM -0400, Brady Norander wrote:
> The Chromebook Pixel 2013 (Link)'s ec does not support the lightbar manual suspend commands.
> As a result, attempting to suspend the device fails and prints the following error:
> 
>     cros-ec-lightbar cros-ec-lightbar.3.auto: PM: dpm_run_callback(): platform_pm_suspend returns -22
>     cros-ec-lightbar cros-ec-lightbar.3.auto: PM: failed to suspend: error -22
>     PM: Some devices failed to suspend, or early wake event detected

Thanks for looking on this.

> @@ -550,7 +557,7 @@ static int cros_ec_lightbar_probe(struct platform_device *pd)
>  		return -ENODEV;
>  
>  	/* Take control of the lightbar from the EC. */
> -	lb_manual_suspend_ctrl(ec_dev, 1);
> +	has_manual_suspend = (lb_manual_suspend_ctrl(ec_dev, 1) >= 0);

The driver doesn't emit an error if lb_manual_suspend_ctrl() returns an
error in the first place.  However, I think `has_manual_suspend` should
only check for -22.  E.g.:

has_manual_suspend = lb_manual_suspend_ctrl(...) != -EINVAL;

  reply	other threads:[~2025-10-27  3:54 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-23 23:42 [PATCH] platform/chrome: cros_ec_lightbar: Check if ec supports suspend commands Brady Norander
2025-10-27  3:54 ` Tzung-Bi Shih [this message]
2025-10-30 13:23   ` Brady Norander
2025-10-30 20:17 ` Benson Leung

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=aP7s2ib_nUIZ3X5O@google.com \
    --to=tzungbi@kernel.org \
    --cc=bleung@chromium.org \
    --cc=bradynorander@gmail.com \
    --cc=chrome-platform@lists.linux.dev \
    --cc=groeck@chromium.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.