summaryrefstree
path: root/kernel/arch/arm/mach-exynos/include/mach/devfreq.h
blob: a4b55a8c5b8ab0f429ef565700088dde09cfa5ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/* linux/arch/arm/mach-exynos/include/mach/exynos-devfreq.h
 *
 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
 *              http://www.samsung.com
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
#ifndef __EXYNOS_DEVFREQ_H_
#define __EXYNOS_DEVFREQ_H_
enum devfreq_media_type {
	TYPE_FIMC_LITE,
	TYPE_MIXER,
#ifdef CONFIG_ARM_EXYNOS5422_BUS_DEVFREQ
	TYPE_FIMD1,
#else
	TYPE_DECON,
#endif
#if defined(CONFIG_ARM_EXYNOS5422_BUS_DEVFREQ) || defined(CONFIG_ARM_EXYNOS5433_BUS_DEVFREQ)
	TYPE_UD_ENCODING,
	TYPE_UD_DECODING,
#endif
	TYPE_TV,
	TYPE_GSCL_LOCAL,
	TYPE_RESOLUTION,
};

enum devfreq_media_resolution {
	RESOLUTION_HD,
	RESOLUTION_FULLHD,
	RESOLUTION_WQHD,
	RESOLUTION_WQXGA,
};

enum devfreq_layer_count {
	NUM_LAYER_0,
	NUM_LAYER_1,
	NUM_LAYER_2,
	NUM_LAYER_3,
	NUM_LAYER_4,
	NUM_LAYER_5,
	NUM_LAYER_6,
};

#if defined(CONFIG_ARM_EXYNOS5430_BUS_DEVFREQ) || defined(CONFIG_ARM_EXYNOS5433_BUS_DEVFREQ)
void exynos5_update_media_layers(enum devfreq_media_type media_type, unsigned int value);
void exynos5_int_notify_power_status(const char* pd_name, unsigned int turn_on);
void exynos5_isp_notify_power_status(const char* pd_name, unsigned int turn_on);
void exynos5_disp_notify_power_status(const char* pd_name, unsigned int turn_on);
unsigned long exynos5_devfreq_get_mif_freq(void);
int exynos5_devfreq_get_mif_level(void);
#elif defined(CONFIG_ARM_EXYNOS7420_BUS_DEVFREQ)
void exynos7_update_media_layers(enum devfreq_media_type media_type, unsigned int value);
void exynos7_int_notify_power_status(const char* pd_name, unsigned int turn_on);
void exynos7_isp_notify_power_status(const char* pd_name, unsigned int turn_on);
void exynos7_disp_notify_power_status(const char* pd_name, unsigned int turn_on);
#endif

#if defined(CONFIG_ARM_EXYNOS5433_BUS_DEVFREQ)
#include <linux/notifier.h>
int exynos_mif_add_notifier(struct notifier_block *nb);
#endif

#if defined(CONFIG_ARM_EXYNOS5430_BUS_DEVFREQ) || defined(CONFIG_ARM_EXYNOS5433_BUS_DEVFREQ)
extern int exynos5_mif_thermal_add_notifier(struct notifier_block *n);
#else
static inline int exynos5_mif_thermal_add_notifier(struct notifier_block *n)
{
	return 0;
}
#endif

#ifdef CONFIG_ARM_EXYNOS5422_BUS_DEVFREQ
enum devfreq_transition {
    MIF_DEVFREQ_PRECHANGE,
    MIF_DEVFREQ_POSTCHANGE,
    MIF_DEVFREQ_EN_MONITORING,
    MIF_DEVFREQ_DIS_MONITORING,
};

void exynos5_int_nocp_resume(void);
void exynos5_mif_transition_disable(bool disable);
void exynos5_update_media_layers(enum devfreq_media_type media_type, unsigned int value);
#endif /* CONFIG_ARM_EXYNOS5422_BUS_DEVFREQ */

#endif