HiKey/HiKey960: Rework HiKey PowerHAL to use power@1.1 interface
This reworks the old power.hikey[960].so poewrHAL library to
implement the power@1.1-service interface.
Much of this change is taken from the marlin implementation.
Change-Id: I7cc4068a28dfb48348b18024b00ff53526e189af
Signed-off-by: John Stultz <john.stultz@linaro.org>
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index dacdb9f..52a29e5 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -34,6 +34,8 @@
/dev/block/platform/soc/f723d000\.dwmmc0/by-name/userdata u:object_r:userdata_block_device:s0
+/vendor/bin/hw/android\.hardware\.power@1\.1-service\.hikey-common u:object_r:hal_power_default_exec:s0
+
/vendor/lib(64)?/libRSDriverArm\.so u:object_r:same_process_hal_file:s0
/vendor/lib64/libbccArm\.so u:object_r:same_process_hal_file:s0
/vendor/lib64/libbcc\.so u:object_r:same_process_hal_file:s0
diff --git a/sepolicy/hal_power.te b/sepolicy/hal_power.te
new file mode 100644
index 0000000..476a603
--- /dev/null
+++ b/sepolicy/hal_power.te
@@ -0,0 +1,9 @@
+typeattribute hal_power_default data_between_core_and_vendor_violators;
+
+allow hal_power_default cgroup:dir search;
+allow hal_power_default cgroup:file rw_file_perms;
+
+allow hal_power_default sysfs_devices_system_cpu:file rw_file_perms;
+allow hal_power_default sysfs_power:file rw_file_perms;
+
+