summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/soc/qcom/lpm-stats.h34
1 files changed, 29 insertions, 5 deletions
diff --git a/include/soc/qcom/lpm-stats.h b/include/soc/qcom/lpm-stats.h
index 05f5516f4177..d689d6a8d3db 100644
--- a/include/soc/qcom/lpm-stats.h
+++ b/include/soc/qcom/lpm-stats.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@@ -17,6 +17,29 @@
struct lpm_stats;
+#define MAX_STR_LEN 256
+
+struct lifo_stats {
+ uint32_t last_in;
+ uint32_t first_out;
+};
+
+struct lpm_stats {
+ char name[MAX_STR_LEN];
+ struct level_stats *time_stats;
+ uint32_t num_levels;
+ struct lifo_stats lifo;
+ struct lpm_stats *parent;
+ struct list_head sibling;
+ struct list_head child;
+ struct cpumask mask;
+ struct dentry *directory;
+ int64_t sleep_time;
+ bool is_cpu;
+};
+
+
+
#ifdef CONFIG_MSM_IDLE_STATS
struct lpm_stats *lpm_stats_config_level(const char *name,
const char **levels, int num_levels, struct lpm_stats *parent,
@@ -24,8 +47,8 @@ struct lpm_stats *lpm_stats_config_level(const char *name,
void lpm_stats_cluster_enter(struct lpm_stats *stats, uint32_t index);
void lpm_stats_cluster_exit(struct lpm_stats *stats, uint32_t index,
bool success);
-void lpm_stats_cpu_enter(uint32_t index);
-void lpm_stats_cpu_exit(uint32_t index, bool success);
+void lpm_stats_cpu_enter(uint32_t index, uint64_t time);
+void lpm_stats_cpu_exit(uint32_t index, uint64_t time, bool success);
void lpm_stats_suspend_enter(void);
void lpm_stats_suspend_exit(void);
#else
@@ -48,12 +71,13 @@ static inline void lpm_stats_cluster_exit(struct lpm_stats *stats,
return;
}
-static inline void lpm_stats_cpu_enter(uint32_t index)
+static inline void lpm_stats_cpu_enter(uint32_t index, uint64_t time)
{
return;
}
-static inline void lpm_stats_cpu_exit(uint32_t index, bool success)
+static inline void lpm_stats_cpu_exit(uint32_t index, bool success,
+ uint64_t time)
{
return;
}