Power Management

Introduction

The power management subsystem provides the following functionalities:

  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

Figure 1 Power management subsystem architecture

Directory Structure

/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

Usage

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.

Repositories Involved

Power Management subsystem

powermgr_battery_manager

powermgr_power_manager

powermgr_display_manager