power.stats: Add AidlStateResidencyDataProvider

Some drivers that we want to collect power stats from are pass-through
and would require significant changes in order to provide a sysfs node
that the current power stats framework can pull stats from.

These pass-through drivers typically have a userspace daemon that is
capable of keeping track of the power stats and providing them to the
power.stats HAL service, but currently have no way to do that.

The AidlStateResidencyDataProvider will provide a vendor binder service
that will allow the userspace daemon to push updates or the power
statistics to power.stats HAL.

Bug: 117585786
Test: Created a PTS test to update some mock power entities that were
created using the AidlStateResidencyDataProvider. Further testing is
planned when real power entities start using this.

Change-Id: I73e02cb65da9c22850f65b96c12554a28f1fbb60
This commit is contained in:
Benjamin Schwartz
2019-02-13 09:54:35 -08:00
parent 8a9a191958
commit 81b6f12e13
3 changed files with 10 additions and 1 deletions

View File

@@ -3,4 +3,9 @@ r_dir_file(hal_power_stats_default, debugfs_rpm)
r_dir_file(hal_power_stats_default, debugfs_wlan)
# power.stats HAL needs access to the easel sysfs node
r_dir_file(hal_power_stats_default, sysfs_easel)
r_dir_file(hal_power_stats_default, sysfs_easel)
# Allow power.stats HAL to add the power_stats_service
vndbinder_use(hal_power_stats)
add_service(hal_power_stats_server, power_stats_service)

View File

@@ -1,2 +1,4 @@
type qdisplay_service, vndservice_manager_type;
type per_mgr_service, vndservice_manager_type;
type power_stats_service, vndservice_manager_type;

View File

@@ -1,2 +1,4 @@
display.qservice u:object_r:qdisplay_service:s0
vendor.qcom.PeripheralManager u:object_r:per_mgr_service:s0
power.stats-vendor u:object_r:power_stats_service:s0