2 * Rockchip SoC Mali-450 DVFS driver
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software FoundatIon.
8 #include <linux/workqueue.h>
9 #include <linux/types.h>
10 #include <linux/device.h>
17 * mali_dvfs_context_t, context of mali_dvfs_facility.
21 * work_to_handle_mali_utilization_event.
23 struct work_struct work;
25 * current_mali_utilization.
27 unsigned int utilisation;
29 * index_of_current_dvfs_level.
30 * current_dvfs_level 在 available_dvfs_level_list 中的 index.
32 unsigned int current_level;
35 * mali_dvfs_facility 是否被使能.
40 * count_of_continuous_requests_to_jump_up_in_dvfs_level_table.
41 * 对 "连续" 的 requests_to_jump_up_in_dvfs_level_table 计数.
43 unsigned int m_count_of_requests_to_jump_up;
46 * count_of_continuous_requests_to_jump_down_in_dvfs_level_table.
47 * 对 "连续" 的 requests_to_jump_down_in_dvfs_level_table 计数.
49 unsigned int m_count_of_requests_to_jump_down;
52 int mali_dvfs_init(struct device *dev);
54 void mali_dvfs_term(struct device *dev);
56 bool mali_dvfs_is_enabled(struct device *dev);
58 void mali_dvfs_enable(struct device *dev);
60 void mali_dvfs_disable(struct device *dev);
62 unsigned int mali_dvfs_utilisation(struct device *dev);
64 int mali_dvfs_event(struct device *dev, u32 utilisation);
66 #endif /*_MALI_DVFS_H_*/