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

From: Tzung-Bi Shih
Date: Mon Aug 08 2022 - 02:07:18 EST


On Fri, Aug 05, 2022 at 03:17:17PM -0700, Evan Green wrote:
> diff --git a/Documentation/ABI/testing/debugfs-cros-ec b/Documentation/ABI/testing/debugfs-cros-ec
> index 1fe0add99a2a99..8e7e76e6481550 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
> +Date: August 2022
> +KernelVersion: 6.0

The merge window is opened. It's too late for the patch if the following
outcome version is 6.0.

> +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
> + time in milliseconds the EC will wait before declaring a sleep
> + timeout event and attempting to wake the system.
> +
> + Supply 0 to use the default value coded into EC firmware. Supply
> + 65535 to disable the EC sleep failure detection mechanism.

Better to mention EC_HOST_SLEEP_TIMEOUT_INFINITE or [1] in the description.
Or, it's not obvious from the patch that 65535 disables the mechanism.

[1]: https://chromium.googlesource.com/chromiumos/platform/ec/+/refs/heads/main/power/host_sleep.c