clk: Add COMMON_CLK_DEBUGFS

Make clk debugfs interface selectable.
Save about 15ms of boot time on RK1808 EVB if unselected.

Change-Id: Ie0095164d31f85491da755284f3a347dfb24cfdc
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This commit is contained in:
Tao Huang
2019-09-17 17:53:18 +08:00
parent d2014f8b68
commit 6d25a993d3
2 changed files with 9 additions and 2 deletions

View File

@@ -22,6 +22,13 @@ config COMMON_CLK
menu "Common Clock Framework"
depends on COMMON_CLK
config COMMON_CLK_DEBUGFS
bool "Common Clock DebugFS interface"
depends on COMMON_CLK && DEBUG_FS
default y
help
Turns on the DebugFS interface for clock.
config COMMON_CLK_WM831X
tristate "Clock driver for WM831x/2x PMICs"
depends on MFD_WM831X

View File

@@ -73,7 +73,7 @@ struct clk_core {
struct hlist_node child_node;
struct hlist_head clks;
unsigned int notifier_count;
#ifdef CONFIG_DEBUG_FS
#ifdef CONFIG_COMMON_CLK_DEBUGFS
struct dentry *dentry;
struct hlist_node debug_node;
#endif
@@ -2617,7 +2617,7 @@ EXPORT_SYMBOL_GPL(clk_is_match);
/*** debugfs support ***/
#ifdef CONFIG_DEBUG_FS
#ifdef CONFIG_COMMON_CLK_DEBUGFS
#include <linux/debugfs.h>
static struct dentry *rootdir;