crosvm/devices
Yuan Yao 18e1454927 bat: Add fake_power/resume_fake_power crosvm_control api
This CL adds two crosvm_control APIs for faking power and resuming
power from fake configuratiion. The APIs are designed for support arcvm
doze mode.

The crosvm_client_fake_power() is used to set battery's fake
configuration. The power status will always be on battery, which means
ac_online=0. Also, the maximum battery capacity that could be read by
guest is set to max_battery_capacity.

The crosvm_client_cancel_fake_power() is used to resume battery from
fake configuration. The battery device will report real host power
status.

BUG=b:353609634
TEST=write C program to call api & test manually

Change-Id: I30513847cfacc211bce885d2ff794fc7ae535c7c
Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/5715936
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
Commit-Queue: Yuan Yao <yuanyaogoog@chromium.org>
2024-10-29 07:04:36 +00:00
..
src bat: Add fake_power/resume_fake_power crosvm_control api 2024-10-29 07:04:36 +00:00
tests/irqchip hypervisor: pass IoOperation data as slices 2024-10-15 20:21:19 +00:00
Cargo.toml Cargo.toml: add missing Windows feature declarations 2024-10-25 21:34:53 +00:00