diff options
Diffstat (limited to 'power-common.h')
-rw-r--r-- | power-common.h | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/power-common.h b/power-common.h index e374e46..697302a 100644 --- a/power-common.h +++ b/power-common.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013, 2018 The Linux Foundation. All rights reserved. + * Copyright (c) 2013, 2018-2019 The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -26,6 +26,13 @@ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifndef __POWER_COMMON_H__ +#define __POWER_COMMON_H__ + +#ifdef __cplusplus +extern "C" { +#endif + #define NODE_MAX (64) #define SCALING_GOVERNOR_PATH "/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" @@ -42,9 +49,21 @@ #define HINT_HANDLED (0) #define HINT_NONE (-1) +#include <hardware/power.h> + enum CPU_GOV_CHECK { CPU0 = 0, CPU1 = 1, CPU2 = 2, CPU3 = 3 }; + +void power_init(void); +void power_hint(power_hint_t hint, void *data); +void set_interactive(int on); + +#ifdef __cplusplus +} +#endif + +#endif //__POWER_COMMON_H___ |