From: Yulgon Kim Date: Wed, 12 Apr 2017 01:33:29 +0000 (+0900) Subject: [COMMON] soc: samsung: add tmu header X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e858d8893da3c8d83801d9318f487ccefd9a2920;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] soc: samsung: add tmu header Change-Id: Icd6bfbe5b4a89c3a9f9c196f1635220afac1269f Signed-off-by: Yulgon Kim --- diff --git a/include/soc/samsung/tmu.h b/include/soc/samsung/tmu.h new file mode 100644 index 000000000000..903034f814b2 --- /dev/null +++ b/include/soc/samsung/tmu.h @@ -0,0 +1,72 @@ +/* + * Copyright 2014 Samsung Electronics Co., Ltd. + * http://www.samsung.com/ + * + * Header file for tmu support + * + * 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 __ASM_ARCH_TMU_H +#define __ASM_ARCH_TMU_H + +#define EXYNOS_MAX_TEMP 125 +#define EXYNOS_MIN_TEMP 10 +#define EXYNOS_COLD_TEMP 15 + +enum tmu_noti_state_t { + TMU_NORMAL, + TMU_COLD, + TMU_HOT, + TMU_CRITICAL, +}; + +enum gpu_noti_state_t { + GPU_NORMAL, + GPU_COLD, + GPU_THROTTLING1, + GPU_THROTTLING2, + GPU_THROTTLING3, + GPU_THROTTLING4, + GPU_TRIPPING, + GPU_THROTTLING, +}; + +enum isp_noti_state_t { + ISP_NORMAL = 0, + ISP_COLD, + ISP_THROTTLING, + ISP_THROTTLING1, + ISP_THROTTLING2, + ISP_THROTTLING3, + ISP_THROTTLING4, + ISP_TRIPPING, +}; + +#ifdef CONFIG_EXYNOS_THERMAL +extern int exynos_tmu_add_notifier(struct notifier_block *n); +#else +static inline int exynos_tmu_add_notifier(struct notifier_block *n) +{ + return 0; +} +#endif +#if defined(CONFIG_GPU_THERMAL) +extern int exynos_gpu_add_notifier(struct notifier_block *n); +#else +static inline int exynos_gpu_add_notifier(struct notifier_block *n) +{ + return 0; +} +#endif +#if defined(CONFIG_ISP_THERMAL) +extern int exynos_tmu_isp_add_notifier(struct notifier_block *n); +#else +static inline int exynos_tmu_isp_add_notifier(struct notifier_block *n) +{ + return 0; +} +#endif +#endif /* __ASM_ARCH_TMU_H */