1/* 2 * Copyright (C) 2016 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 */ 16package android.hardware.power@1.1; 17 18/** 19 * Subsytem-level sleep state stats: 20 * PowerStateSubsystemSleepState represents the sleep states 21 * a subsystem (e.g. wifi, bt) is capable of getting into. 22 * 23 * SoCs like wifi, bt usually have more than one subsystem level sleep state. 24 */ 25struct PowerStateSubsystemSleepState { 26 /** 27 * Subsystem-level Sleep state name. 28 */ 29 string name; 30 31 /** 32 * Time spent in msec at this subsystem-level sleep state since boot. 33 */ 34 uint64_t residencyInMsecSinceBoot; 35 36 /** 37 * Total number of times sub-system entered this state. 38 */ 39 uint64_t totalTransitions; 40 41 /** 42 * Timestamp of last entry of this state measured in MSec 43 */ 44 uint64_t lastEntryTimestampMs; 45 46 /** 47 * This subsystem-level sleep state can only be reached during system suspend 48 */ 49 bool supportedOnlyInSuspend; 50}; 51 52/** 53 * Subsytem-level sleep state stats: 54 * PowerStateSubsystem represents a subsystem (e.g. wifi, bt) 55 * and all the sleep states this susbsystem is capable of getting into. 56 * 57 * SoCs like wifi, bt usually have more than one subsystem level sleep state. 58 */ 59struct PowerStateSubsystem { 60 /** 61 * Subsystem name (e.g. wifi, bt etc.) 62 */ 63 string name; 64 65 /** 66 * states represents the list of sleep states supported by this susbsystem. 67 * Higher the index in the returned <states> vector deeper the state is 68 * i.e. lesser steady-state power is consumed by the subsystem to 69 * to be resident in that state. 70 * 71 * Vector of size zero implies either the info is not available 72 * or the subsystem does not have any sleep states. 73 */ 74 vec<PowerStateSubsystemSleepState> states; 75}; 76