summaryrefslogtreecommitdiff
path: root/drivers/platform/chrome/cros_ec_debugfs.h
diff options
context:
space:
mode:
authorEric Caruso <ejcaruso@chromium.org>2017-05-16 17:46:48 +0200
committerBenson Leung <bleung@chromium.org>2017-06-16 13:57:45 -0700
commite86264595225d2764a903965356ef59aeb7d1c47 (patch)
treef4999d2bf8c25004afaa1e351a7776e5378698a4 /drivers/platform/chrome/cros_ec_debugfs.h
parent0aa877c558477e5c4b0faaa618cfd41f8c0b3319 (diff)
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 'drivers/platform/chrome/cros_ec_debugfs.h')
-rw-r--r--drivers/platform/chrome/cros_ec_debugfs.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/drivers/platform/chrome/cros_ec_debugfs.h b/drivers/platform/chrome/cros_ec_debugfs.h
new file mode 100644
index 000000000000..1ff3a50aa1b8
--- /dev/null
+++ b/drivers/platform/chrome/cros_ec_debugfs.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2015 Google, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _DRV_CROS_EC_DEBUGFS_H_
+#define _DRV_CROS_EC_DEBUGFS_H_
+
+#include "cros_ec_dev.h"
+
+/* debugfs stuff */
+int cros_ec_debugfs_init(struct cros_ec_dev *ec);
+void cros_ec_debugfs_remove(struct cros_ec_dev *ec);
+
+#endif /* _DRV_CROS_EC_DEBUGFS_H_ */