#
b2c74c71 |
|
10-Aug-2017 |
Yvonne Yip <yky@google.com> |
[dev][acpi] add support for battery and power source devices Batteries and power source devices (e.g. AC adapters) are published under /dev/class/power. These devices support the following ioctls: IOCTL_POWER_GET_INFO returns the type of the device and its status. IOCTL_POWER_GET_BATTERY_INFO is only supported by batteries. It returns battery status such as capacity and voltage. IOCTL_POWER_GET_STATE_CHANGE_EVENT returns an event the client can use to receive power state change events. When the state is changed MX_USER_SIGNAL_0 is raised on the event. Reading the state with IOCTL_POWER_GET_INFO clears the signal. Refer to magenta/device/power.h for more information on the API. Add the 'lspwr' utility to show information about power devices. Change-Id: Ic354402541659b11693184353e3f5d1deac8a129
|