[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACeCKafyHSTiyyjA=yjSXsTub4kKECfe9gp=y10LCYYx0nGKqg@mail.gmail.com>
Date: Thu, 18 Aug 2022 10:24:23 -0700
From: Prashant Malani <pmalani@...omium.org>
To: Evan Green <evgreen@...omium.org>
Cc: Enric Balletbo i Serra <enric.balletbo@...labora.com>,
Tzung-Bi Shih <tzungbi@...nel.org>,
Rajat Jain <rajatja@...omium.org>,
Benson Leung <bleung@...omium.org>,
Guenter Roeck <groeck@...omium.org>,
Lee Jones <lee.jones@...aro.org>,
Tinghan Shen <tinghan.shen@...iatek.com>,
chrome-platform@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] platform/chrome: cros_ec: Expose suspend_timeout_ms in debugfs
On Thu, Aug 18, 2022 at 8:29 AM Evan Green <evgreen@...omium.org> wrote:
>
> In modern Chromebooks, the embedded controller has a mechanism where
> it will watch a hardware-controlled line that toggles in suspend, and
> wake the system up if an expected sleep transition didn't occur. This
> can be very useful for detecting power management issues where the
> system appears to suspend, but doesn't actually reach its lowest
> expected power states.
>
> Sometimes it's useful in debug and test scenarios to be able to control
> the duration of that timeout, or even disable the EC timeout mechanism
> altogether. Add a debugfs control to set the timeout to values other
> than the EC-defined default, for more convenient debug and
> development iteration.
>
> Signed-off-by: Evan Green <evgreen@...omium.org>
(One minor nit aside) FWIW:
Reviewed-by: Prashant Malani <pmalani@...omium.org>
> ---
>
> Changes in v2:
> - Update release version to 6.1 (Tzung-Bi)
> - Reference EC_HOST_SLEEP_TIMEOUT_INFINITE (Tzung-Bi)
> - Name the debugfs file suspend_timeout_ms (Prashant)
>
> Documentation/ABI/testing/debugfs-cros-ec | 22 +++++++++++++++++++++
> drivers/platform/chrome/cros_ec.c | 3 ++-
> drivers/platform/chrome/cros_ec_debugfs.c | 3 +++
> include/linux/platform_data/cros_ec_proto.h | 1 +
> 4 files changed, 28 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/ABI/testing/debugfs-cros-ec b/Documentation/ABI/testing/debugfs-cros-ec
> index 1fe0add99a2a99..9f79c641b2d09f 100644
> --- a/Documentation/ABI/testing/debugfs-cros-ec
> +++ b/Documentation/ABI/testing/debugfs-cros-ec
> @@ -54,3 +54,25 @@ Description:
> this feature.
>
> Output will be in the format: "0x%08x\n".
> +
> +What: /sys/kernel/debug/<cros-ec-device>/suspend_timeout_ms
> +Date: August 2022
> +KernelVersion: 6.1
> +Description:
> + Some ECs have a feature where they will track transitions to the
> + a hardware-controlled sleep line, such as Intel's SLP_S0 line,
> + in order to detect cases where a system failed to go into deep
> + sleep states. The suspend_timeout file controls the amount of
s/suspend_timeout/suspend_timeout_ms
Powered by blists - more mailing lists