power.h File Reference
#include <stdbool.h>
#include <stdint.h>
#include <sys/cdefs.h>
#include <sys/types.h>
#include <hardware/hardware.h>

Go to the source code of this file.

Data Structures

struct  power_state_voter_t
 
struct  power_state_platform_sleep_state_t
 
struct  power_module
 

Macros

#define POWER_MODULE_API_VERSION_0_1   HARDWARE_MODULE_API_VERSION(0, 1)
 
#define POWER_MODULE_API_VERSION_0_2   HARDWARE_MODULE_API_VERSION(0, 2)
 
#define POWER_MODULE_API_VERSION_0_3   HARDWARE_MODULE_API_VERSION(0, 3)
 
#define POWER_MODULE_API_VERSION_0_4   HARDWARE_MODULE_API_VERSION(0, 4)
 
#define POWER_MODULE_API_VERSION_0_5   HARDWARE_MODULE_API_VERSION(0, 5)
 
#define POWER_HARDWARE_MODULE_ID   "power"
 
#define POWER_STATE_NAME_MAX_LENGTH   100
 
#define POWER_STATE_VOTER_NAME_MAX_LENGTH   100
 

Typedefs

typedef struct power_module power_module_t
 

Enumerations

enum  power_hint_t {
  POWER_HINT_VSYNC = 0x00000001, POWER_HINT_INTERACTION = 0x00000002, POWER_HINT_VIDEO_ENCODE = 0x00000003, POWER_HINT_VIDEO_DECODE = 0x00000004,
  POWER_HINT_LOW_POWER = 0x00000005, POWER_HINT_SUSTAINED_PERFORMANCE = 0x00000006, POWER_HINT_VR_MODE = 0x00000007
}
 
enum  feature_t { POWER_FEATURE_DOUBLE_TAP_TO_WAKE = 0x00000001 }
 

Macro Definition Documentation

#define POWER_HARDWARE_MODULE_ID   "power"

The id of this module

Definition at line 38 of file power.h.

#define POWER_MODULE_API_VERSION_0_1   HARDWARE_MODULE_API_VERSION(0, 1)

Definition at line 29 of file power.h.

#define POWER_MODULE_API_VERSION_0_2   HARDWARE_MODULE_API_VERSION(0, 2)

Definition at line 30 of file power.h.

#define POWER_MODULE_API_VERSION_0_3   HARDWARE_MODULE_API_VERSION(0, 3)

Definition at line 31 of file power.h.

#define POWER_MODULE_API_VERSION_0_4   HARDWARE_MODULE_API_VERSION(0, 4)

Definition at line 32 of file power.h.

#define POWER_MODULE_API_VERSION_0_5   HARDWARE_MODULE_API_VERSION(0, 5)

Definition at line 33 of file power.h.

#define POWER_STATE_NAME_MAX_LENGTH   100

Definition at line 44 of file power.h.

#define POWER_STATE_VOTER_NAME_MAX_LENGTH   100

Definition at line 50 of file power.h.

Typedef Documentation

typedef struct power_module power_module_t

Every hardware module must have a data structure named HAL_MODULE_INFO_SYM and the fields of this data structure must begin with hw_module_t followed by module specific information.

Enumeration Type Documentation

enum feature_t
Enumerator
POWER_FEATURE_DOUBLE_TAP_TO_WAKE 

Definition at line 69 of file power.h.

Enumerator
POWER_HINT_VSYNC 
POWER_HINT_INTERACTION 
POWER_HINT_VIDEO_ENCODE 
POWER_HINT_VIDEO_DECODE 
POWER_HINT_LOW_POWER 
POWER_HINT_SUSTAINED_PERFORMANCE 
POWER_HINT_VR_MODE 

Definition at line 56 of file power.h.