power-management.md 2.2 KB
Newer Older
M
mamingshuai 已提交
1
# Power Management<a name="EN-US_TOPIC_0000001121107655"></a>
L
liudongmiao 已提交
2 3 4

-   [Introduction](#section11660541593)
-   [Directory Structure](#section19472752217)
M
mamingshuai 已提交
5
-   [Usage](#section19959125052315)
L
liudongmiao 已提交
6 7 8 9
-   [Repositories Involved](#section63151229062)

## Introduction<a name="section11660541593"></a>

M
mamingshuai 已提交
10
The power management subsystem provides the following functionalities:
L
liudongmiao 已提交
11

M
mamingshuai 已提交
12 13 14 15 16
1.  Rebooting the device
2.  Managing running locks
3.  Querying the power status
4.  Obtaining and reporting the charging and battery status
5.  Turning on/off the device screen and adjusting the screen brightness
L
liudongmiao 已提交
17

M
mamingshuai 已提交
18
**Figure  1**  Power management subsystem architecture<a name="fig7607759319"></a>  
L
liudongmiao 已提交
19 20


M
mamingshuai 已提交
21
![](figures/power-management-subsystem-architecture.png)
L
liudongmiao 已提交
22 23 24 25

## Directory Structure<a name="section19472752217"></a>

```
M
mamingshuai 已提交
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
/base/powermgr
├── battery_manager            # Battery manager
│   ├── hdi                    # Hardware Driver Interfaces (HDIs)
│   ├── interfaces             # APIs
│   ├── sa_profile             # SA profile
│   ├── services               # Services
│   └── utils                  # Utilities
├── display_manager            # Display manager
│   ├── interfaces             # APIs
│   └── sa_profile             # SA profile
│   └── services               # Services
│   └── utils                  # Utilities
├── powermgr_lite              # Lite power manager
│   ├── interfaces             # APIs
│   └── services               # Services
└── power_manager              # Power manager
    ├── interfaces             # APIs
    ├── sa_profile             # SA profile
    └── services               # Services
    └── utils                  # Utilities
L
liudongmiao 已提交
46 47
```

M
mamingshuai 已提交
48 49 50 51
## Usage<a name="section19959125052315"></a>

You can use the APIs provided by the power management subsystem to create and release a running lock, obtain battery information, adjust the screen brightness, reboot a device, and power off a device.

L
liudongmiao 已提交
52 53
## Repositories Involved<a name="section63151229062"></a>

M
mamingshuai 已提交
54 55 56 57 58 59 60 61
**Power Management subsystem**

powermgr\_battery\_manager

powermgr\_power\_manager

powermgr\_display\_manager