]> git.baikalelectronics.ru Git - kernel.git/commit
mfd: cros_ec: add debugfs, console log file
authorEric Caruso <ejcaruso@chromium.org>
Tue, 16 May 2017 15:46:48 +0000 (17:46 +0200)
committerBenson Leung <bleung@chromium.org>
Fri, 16 Jun 2017 20:57:45 +0000 (13:57 -0700)
commite16461e061d3e6698e54ed6ee3779a8f1b584309
treef4999d2bf8c25004afaa1e351a7776e5378698a4
parentca25f3059606a4a7269c1627b902b3e91f797fe0
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>
drivers/platform/chrome/Makefile
drivers/platform/chrome/cros_ec_debugfs.c [new file with mode: 0644]
drivers/platform/chrome/cros_ec_debugfs.h [new file with mode: 0644]
drivers/platform/chrome/cros_ec_dev.c
include/linux/mfd/cros_ec.h