blob: 5983f0bb05d97d6cea158490e2f26484095fe77c [file] [log] [blame]
Darren Hsu5f322222023-03-13 11:11:55 +08001/*
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#pragma once
17
18#include "DvfsStateResidencyDataProvider.h"
19
20namespace aidl {
21namespace android {
22namespace hardware {
23namespace power {
24namespace stats {
25
26class AdaptiveDvfsStateResidencyDataProvider : public DvfsStateResidencyDataProvider {
27 public:
28 /*
29 * path - path to dvfs sysfs node.
30 * clockRate - clock rate in KHz.
Darren Hsu529b6182023-03-14 14:31:43 +080031 * powerEntities - list of power entity pairs (name to power entity, path to frequency table)
Darren Hsu5f322222023-03-13 11:11:55 +080032 */
33 AdaptiveDvfsStateResidencyDataProvider(
34 std::string path,
35 uint64_t clockRate,
Darren Hsu529b6182023-03-14 14:31:43 +080036 std::vector<std::pair<std::string, std::string>> powerEntities);
Darren Hsu5f322222023-03-13 11:11:55 +080037 ~AdaptiveDvfsStateResidencyDataProvider() = default;
38
39 /*
40 * See IStateResidencyDataProvider::getStateResidencies
41 */
42 bool getStateResidencies(
43 std::unordered_map<std::string, std::vector<StateResidency>> *residencies) override;
44
45 /*
46 * See IStateResidencyDataProvider::getInfo
47 */
48 std::unordered_map<std::string, std::vector<State>> getInfo() override;
49};
50
51} // namespace stats
52} // namespace power
53} // namespace hardware
54} // namespace android
55} // namespace aidl