From 8c3166e17cf10161d2871dfb1d017287c7b79ff1 Mon Sep 17 00:00:00 2001 From: Evan Green Date: Thu, 27 Jun 2019 13:44:45 -0700 Subject: 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 Acked-by: Lee Jones Signed-off-by: Enric Balletbo i Serra --- drivers/platform/chrome/cros_ec_debugfs.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers/platform') diff --git a/drivers/platform/chrome/cros_ec_debugfs.c b/drivers/platform/chrome/cros_ec_debugfs.c index 7ee060743844..8ec1cc2889f2 100644 --- a/drivers/platform/chrome/cros_ec_debugfs.c +++ b/drivers/platform/chrome/cros_ec_debugfs.c @@ -447,6 +447,9 @@ static int cros_ec_debugfs_probe(struct platform_device *pd) debugfs_create_file("uptime", 0444, debug_info->dir, debug_info, &cros_ec_uptime_fops); + debugfs_create_x32("last_resume_result", 0444, debug_info->dir, + &ec->ec_dev->last_resume_result); + ec->debug_info = debug_info; dev_set_drvdata(&pd->dev, ec); -- cgit v1.2.3-59-g8ed1b