blob: 59c570964b0161fe577ab16bc82a8571df0a0e2f [file] [log] [blame]
Greg Kroah-Hartman27fb8312014-08-31 13:54:59 -07001/*
2 * Greybus debugfs code
3 *
4 * Copyright 2014 Google Inc.
Alex Eldera46e9672014-12-12 12:08:42 -06005 * Copyright 2014 Linaro Ltd.
Greg Kroah-Hartman27fb8312014-08-31 13:54:59 -07006 *
7 * Released under the GPLv2 only.
8 */
9
10#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
11
Greg Kroah-Hartman27fb8312014-08-31 13:54:59 -070012#include <linux/debugfs.h>
13
14#include "greybus.h"
15
16static struct dentry *gb_debug_root;
17
Greg Kroah-Hartman48f70472015-03-27 11:38:06 +010018void gb_debugfs_init(void)
Greg Kroah-Hartman27fb8312014-08-31 13:54:59 -070019{
20 gb_debug_root = debugfs_create_dir("greybus", NULL);
Greg Kroah-Hartman27fb8312014-08-31 13:54:59 -070021}
22
Greg Kroah-Hartmande536e32014-08-31 16:17:04 -070023void gb_debugfs_cleanup(void)
Greg Kroah-Hartman27fb8312014-08-31 13:54:59 -070024{
25 debugfs_remove_recursive(gb_debug_root);
Viresh Kumarf66832da2014-11-14 17:25:01 +053026 gb_debug_root = NULL;
Greg Kroah-Hartman27fb8312014-08-31 13:54:59 -070027}
Alexandre Bailone8f824b2015-03-18 15:42:51 +010028
29struct dentry *gb_debugfs_get(void)
30{
31 return gb_debug_root;
32}
33EXPORT_SYMBOL_GPL(gb_debugfs_get);