diff options
author | Eric Caruso <ejcaruso@chromium.org> | 2017-05-16 17:46:48 +0200 |
---|---|---|
committer | Benson Leung <bleung@chromium.org> | 2017-06-16 22:57:45 +0200 |
commit | e86264595225d2764a903965356ef59aeb7d1c47 (patch) | |
tree | f4999d2bf8c25004afaa1e351a7776e5378698a4 /include | |
parent | mfd: cros_ec: Add EC console read structures definitions (diff) | |
download | linux-e86264595225d2764a903965356ef59aeb7d1c47.tar.xz linux-e86264595225d2764a903965356ef59aeb7d1c47.zip |
mfd: cros_ec: add debugfs, console log file
If the EC supports the new CONSOLE_READ command type, then we
place a console_log file in debugfs for that EC device which allows
us to grab EC logs. The kernel will poll every 10 seconds for the
log and keep its own buffer, but userspace should grab this and
write it out to some logs which actually get rotated.
Signed-off-by: Eric Caruso <ejcaruso@chromium.org>
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
[bleung: restored original version of this commit, with pointer size
issue to be fixed in next commit]
Signed-off-by: Benson Leung <bleung@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mfd/cros_ec.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h index b61b2e013698..3b16c9009749 100644 --- a/include/linux/mfd/cros_ec.h +++ b/include/linux/mfd/cros_ec.h @@ -172,6 +172,8 @@ struct cros_ec_platform { u16 cmd_offset; }; +struct cros_ec_debugfs; + /* * struct cros_ec_dev - ChromeOS EC device entry point * @@ -179,6 +181,7 @@ struct cros_ec_platform { * @cdev: Character device structure in /dev * @ec_dev: cros_ec_device structure to talk to the physical device * @dev: pointer to the platform device + * @debug_info: cros_ec_debugfs structure for debugging information * @cmd_offset: offset to apply for each command. */ struct cros_ec_dev { @@ -186,6 +189,7 @@ struct cros_ec_dev { struct cdev cdev; struct cros_ec_device *ec_dev; struct device *dev; + struct cros_ec_debugfs *debug_info; u16 cmd_offset; u32 features[2]; }; |