1 /* 2 * Copyright (c) 2020-2021 Huawei Device Co., Ltd. 3 * 4 * HDF is dual licensed: you can use it either under the terms of 5 * the GPL, or the BSD license, at your option. 6 * See the LICENSE file in the root of this repository for complete details. 7 */ 8 9 #ifndef HDF_POWER_STATE_H 10 #define HDF_POWER_STATE_H 11 12 enum HdfPowerState { 13 POWER_STATE_DOZE_RESUME, 14 POWER_STATE_DOZE_SUSPEND, 15 POWER_STATE_RESUME, 16 POWER_STATE_SUSPEND, 17 POWER_STATE_MAX, 18 }; 19 IsPowerWakeState(uint32_t state)20static inline bool IsPowerWakeState(uint32_t state) 21 { 22 return state == POWER_STATE_DOZE_RESUME || state == POWER_STATE_RESUME; 23 } 24 IsValidPowerState(uint32_t state)25static inline bool IsValidPowerState(uint32_t state) 26 { 27 return state < POWER_STATE_MAX; 28 } 29 30 #endif /* HDF_POWER_STATE_H */