blob: 9c6e5a37da417165c447210e45f28f50f57eb9a8 [file] [log] [blame]
Sathish Ambley519f68e2017-07-19 10:26:51 -07001/*
2 * Copyright (c) 2017, The Linux Foundation. All rights reserved.
3 * Not a contribution
4 * Copyright (C) 2016 The Android Open Source Project
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18
19#include "vr_int.h"
20
21// List thermal configs in format {name, algo_type}
22// This list is manually synced with the thermal config
23
24#define THERMAL_CONFIG_SYNCED 1
25
26#if THERMAL_CONFIG_SYNCED
27
28#define NUM_NON_VR_CONFIGS 4
29static thermal_algo_info_t non_vr_thermal_configs[NUM_NON_VR_CONFIGS] =
30 {{.config_name = "SKIN-HIGH-FLOOR", .algo_name = "ss"},
31 {.config_name = "SKIN-MID-FLOOR", .algo_name = "ss"},
32 {.config_name = "SKIN-LOW-FLOOR", .algo_name = "ss"},
33 {.config_name = "VIRTUAL-SS-GPU-SKIN", .algo_name = "ss"}};
34
35#define NUM_VR_CONFIGS 1
36static thermal_algo_info_t vr_thermal_configs[NUM_VR_CONFIGS] =
37 {{.config_name = "VR-EMMC", .algo_name = "monitor"}};
38
39int load_thermal_cfg_info(thermal_cfg_info_t *non_vr, thermal_cfg_info_t *vr) {
40
41 if(!non_vr || !vr)
42 return -1;
43
44 non_vr->num_cfgs = NUM_NON_VR_CONFIGS;
45 non_vr->cfgs = &non_vr_thermal_configs[0];
46
47 vr->num_cfgs = NUM_VR_CONFIGS;
48 vr->cfgs = &vr_thermal_configs[0];
49
50 return 0;
51}
52
53#endif