Commit graph

4 commits

Author SHA1 Message Date
Evan Green
e8bf17d58a platform/chrome: cros_ec: Expose suspend_timeout_ms in debugfs
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>
Reviewed-by: Prashant Malani <pmalani@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Link: https://lore.kernel.org/r/20220822144026.v3.1.Idd188ff3f9caddebc17ac357a13005f93333c21f@changeid
[tzungbi: fix one nit in Documentation/ABI/testing/debugfs-cros-ec.]
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
2022-08-24 02:37:07 +00:00
Evan Green
8c3166e17c mfd / platform: cros_ec_debugfs: Expose resume result via debugfs
For ECs that support it, the EC returns the number of slp_s0
transitions and whether or not there was a timeout in the resume
response. Expose the last resume result to usermode via debugfs so
that usermode can detect and report S0ix timeouts.

Signed-off-by: Evan Green <evgreen@chromium.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
2019-07-01 15:39:11 +02:00
Enric Balletbo i Serra
1fbc6ec2f3 platform/chrome: cros_ec_debugfs: Add debugfs ABI documentation
Add the missing ABI documentation for the already available debugfs
entries: console_log, panicinfo and pdinfo.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
2019-06-18 10:07:54 +02:00
Tim Wawrzynczak
e90716a661 platform/chrome: cros_ec_debugfs: Add debugfs entry to retrieve EC uptime
The new debugfs entry 'uptime' is being made available to userspace so that
a userspace daemon can synchronize EC logs with host time.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
[rework based on Tim's first approach]
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Tested-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2019-06-18 10:07:13 +02:00