Re: [PATCH v3] platform/chrome: cros_ec: Expose suspend_timeout_ms in debugfs

From: Stephen Boyd
Date: Mon Aug 22 2022 - 18:58:21 EST


Quoting Evan Green (2022-08-22 14:40:40)
> 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@xxxxxxxxxxxx>
> Reviewed-by: Prashant Malani <pmalani@xxxxxxxxxxxx>

Reviewed-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>

One nit below

> diff --git a/Documentation/ABI/testing/debugfs-cros-ec b/Documentation/ABI/testing/debugfs-cros-ec
> index 1fe0add99a2a99..66fe915acd739b 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

s/to the/of/

> + 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