Initial commit
[kernel/linux-3.0.git] / drivers / gpu / vithar_rev0 / kbase / src / platform / mali_kbase_dvfs.h
1 /* drivers/gpu/vithar/kbase/src/platform/mali_kbase_dvfs.h
2  *
3  * Copyright 2011 by S.LSI. Samsung Electronics Inc.
4  * San#24, Nongseo-Dong, Giheung-Gu, Yongin, Korea
5  *
6  * Samsung SoC Mali-T604 DVFS driver
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License version 2 as
10  * published by the Free Software FoundatIon.
11  */
12
13 /**
14  * @file mali_kbase_dvfs.h
15  * DVFS
16  */
17
18 #ifndef _KBASE_DVFS_H_
19 #define _KBASE_DVFS_H_
20
21 /* Frequency that DVFS clock frequency decisions should be made */
22 #define KBASE_PM_DVFS_FREQUENCY                 100
23
24 #define MALI_DVFS_DEBUG 0
25 #define MALI_DVFS_START_MAX_STEP 1
26
27 #define MALI_DVFS_STEP 4
28
29 #define MALI_DVFS_KEEP_STAY_CNT 10
30
31 struct regulator *kbase_platform_get_regulator(void);
32 int kbase_platform_regulator_init(struct device *dev);
33 int kbase_platform_regulator_disable(struct device *dev);
34 int kbase_platform_regulator_enable(struct device *dev);
35 int kbase_platform_get_default_voltage(struct device *dev, int *vol);
36 int kbase_platform_get_voltage(struct device *dev, int *vol);
37 int kbase_platform_set_voltage(struct device *dev, int vol);
38
39 #ifdef CONFIG_VITHAR_DVFS
40 int kbase_platform_dvfs_init(struct device *dev, int step);
41 void kbase_platform_dvfs_term(void);
42 int kbase_platform_dvfs_event(kbase_device *kbdev, u32 utilisation);
43 int kbase_platform_dvfs_get_control_status(void);
44 int kbase_pm_get_dvfs_utilisation(kbase_device *kbdev);
45 #endif
46
47 #endif /* _KBASE_DVFS_H_ */