lkml.org 
[lkml]   [2022]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] platform/chrome: cros_ec: Expose suspend_timeout_ms in debugfs
On Thu, Aug 18, 2022 at 8:29 AM Evan Green <evgreen@chromium.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@chromium.org>
(One minor nit aside) FWIW:
Reviewed-by: Prashant Malani <pmalani@chromium.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

\
 
 \ /
  Last update: 2022-08-18 19:28    [W:0.547 / U:0.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site