1/* 2 * Copyright (C) 2023 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 syntax = "proto3"; 17 package devices; 18 19 message PowerhintConfig { 20 repeated Node nodes = 1 [ json_name = "Nodes" ]; 21 repeated Action actions = 2 [ json_name = "Actions" ]; 22 repeated AdpfConfig adpf_configs = 3 [ json_name = "AdpfConfig" ]; 23 } 24 message Node { 25 string name = 1 [ json_name = "Name" ]; 26 string path = 2 [ json_name = "Path" ]; 27 repeated string values = 3 [ json_name = "Values" ]; 28 bool reset_on_init = 4 [ json_name = "ResetOnInit" ]; 29 int32 default_index = 5 [ json_name = "DefaultIndex" ]; 30 string type = 6 [ json_name = "Type"]; 31 bool hold_fd = 7 [ json_name = "HoldFd"]; 32 bool write_only = 8 [ json_name = "WriteOnly" ]; 33 } 34 message Action { 35 string powerhint = 1 [ json_name = "PowerHint" ]; 36 string node = 2 [ json_name = "Node" ]; 37 int32 duration = 3 [ json_name = "Duration" ]; 38 string value = 4 [ json_name = "Value" ]; 39 string type = 5 [ json_name = "Type"]; 40 } 41 message AdpfConfig { 42 string name = 1 [ json_name = "Name" ]; 43 bool pid_on = 2 [ json_name = "PID_On" ]; 44 float pid_po = 3 [ json_name = "PID_Po" ]; 45 float pid_pu = 4 [ json_name = "PID_Pu" ]; 46 float pid_i = 5 [ json_name = "PID_I" ]; 47 float pid_i_init = 6 [ json_name = "PID_I_Init" ]; 48 float pid_i_high = 7 [ json_name = "PID_I_High" ]; 49 float pid_i_low = 8 [ json_name = "PID_I_Low" ]; 50 float pid_do = 9 [ json_name = "PID_Do" ]; 51 float pid_du = 10 [ json_name = "PID_Du" ]; 52 bool uclampmin_on = 11 [ json_name = "UclampMin_On" ]; 53 float uclampmin_init = 12 [ json_name = "UclampMin_Init" ]; 54 float uclampmin_high = 13 [ json_name = "UclampMin_High" ]; 55 float uclampmin_low = 14 [ json_name = "UclampMin_Low" ]; 56 float samplingwindow_p = 15 [ json_name = "SamplingWindow_P" ]; 57 float samplingwindow_i = 16 [ json_name = "SamplingWindow_I" ]; 58 float samplingwindow_d = 17 [ json_name = "SamplingWindow_D" ]; 59 float reportingratelimitns = 18 [ json_name = "ReportingRateLimitNs" ]; 60 bool earlyboost_on = 19 [ json_name = "EarlyBoost_On" ]; 61 float earlyboost_timefactor = 20 [ json_name = "EarlyBoost_TimeFactor" ]; 62 float targettimefactor = 21 [ json_name = "TargetTimeFactor" ]; 63 float staletimefactor = 22 [ json_name = "StaleTimeFactor" ]; 64}