aboutsummaryrefslogtreecommitdiff
path: root/include/linux/clk-private.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/clk-private.h')
-rw-r--r--include/linux/clk-private.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/clk-private.h b/include/linux/clk-private.h
index 0ca5f6046920..228a98724b1e 100644
--- a/include/linux/clk-private.h
+++ b/include/linux/clk-private.h
@@ -13,7 +13,9 @@
#include <linux/clk-provider.h>
#include <linux/kref.h>
+#include <linux/ktime.h>
#include <linux/list.h>
+#include <linux/rbtree.h>
/*
* WARNING: Do not include clk-private.h from any file that implements struct
@@ -28,6 +30,14 @@
struct module;
+#ifdef CONFIG_COMMON_CLK_FREQ_STATS_ACCOUNTING
+struct freq_stats {
+ ktime_t time_spent;
+ unsigned long rate;
+ struct rb_node node;
+};
+#endif /*CONFIG_COMMON_CLK_FREQ_STATS_ACCOUNTING*/
+
struct clk {
const char *name;
const struct clk_ops *ops;
@@ -53,6 +63,13 @@ struct clk {
unsigned int notifier_count;
#ifdef CONFIG_DEBUG_FS
struct dentry *dentry;
+#ifdef CONFIG_COMMON_CLK_FREQ_STATS_ACCOUNTING
+ struct rb_root freq_stats_table;
+ struct freq_stats *current_freq_stats;
+ ktime_t default_freq_time;
+ ktime_t start_time;
+#endif /* CONFIG_COMMON_CLK_FREQ_STATS_ACCOUNTING*/
+
#endif
struct kref ref;
};