[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aP7s2ib_nUIZ3X5O@google.com>
Date: Mon, 27 Oct 2025 03:54:02 +0000
From: Tzung-Bi Shih <tzungbi@...nel.org>
To: Brady Norander <bradynorander@...il.com>
Cc: chrome-platform@...ts.linux.dev, linux-kernel@...r.kernel.org,
Benson Leung <bleung@...omium.org>,
Guenter Roeck <groeck@...omium.org>
Subject: Re: [PATCH] platform/chrome: cros_ec_lightbar: Check if ec supports
suspend commands
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;
Powered by blists - more mailing lists