author | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-02-07 02:33:33 (GMT) |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-02-07 02:33:33 (GMT) |
commit | cc5536719b0003da9bec1945ebf0f9f8dad2d218 (patch) | |
tree | b498c7479dd101f01e6032bdc1edc93d164e1817 | |
parent | d7172d0ab62ebc785780eaa900817e2e4d9c3a48 (diff) | |
parent | 1124035ef0006c65e2bcd2fe1a811e0068597581 (diff) | |
download | common-cc5536719b0003da9bec1945ebf0f9f8dad2d218.zip common-cc5536719b0003da9bec1945ebf0f9f8dad2d218.tar.gz common-cc5536719b0003da9bec1945ebf0f9f8dad2d218.tar.bz2 |
thermal2: add thermal 2.0 hidl service [1/2] am: 1124035ef0
Change-Id: I907109da946ee5495785778e01a1608c78039cff
-rwxr-xr-x | core_amlogic.mk | 10 | ||||
-rwxr-xr-x | hidl_manifests/manifest_common.xml | 9 | ||||
-rwxr-xr-x | sepolicy/file.te | 1 | ||||
-rwxr-xr-x | sepolicy/file_contexts | 7 | ||||
-rw-r--r-- | sepolicy/hal_thermal_default.te | 4 | ||||
-rwxr-xr-x | thermal_info_config.json | 29 |
6 files changed, 45 insertions, 15 deletions
diff --git a/core_amlogic.mk b/core_amlogic.mk index 8ffec96..17d10cd 100755 --- a/core_amlogic.mk +++ b/core_amlogic.mk @@ -203,8 +203,7 @@ PRODUCT_PACKAGES += \ power.amlogic \ hwcomposer.amlogic \ memtrack.amlogic \ - screen_source.amlogic \ - thermal.amlogic + screen_source.amlogic #glscaler and 3d format api PRODUCT_PACKAGES += \ @@ -441,8 +440,11 @@ PRODUCT_PACKAGES += \ #thermal hal PRODUCT_PACKAGES += \ - android.hardware.thermal@1.0-impl \ - android.hardware.thermal@1.0-service + android.hardware.thermal@2.0-service.droidlogic + +#normally, every device need a config file, currently all chips are the same +PRODUCT_COPY_FILES += \ + device/amlogic/common/thermal_info_config.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json #PRODUCT_PACKAGES += \ # android.hardware.cas@1.2-service diff --git a/hidl_manifests/manifest_common.xml b/hidl_manifests/manifest_common.xml index c8261a6..e427fad 100755 --- a/hidl_manifests/manifest_common.xml +++ b/hidl_manifests/manifest_common.xml @@ -185,15 +185,6 @@ </interface> </hal> <hal format="hidl"> - <name>android.hardware.thermal</name> - <transport>hwbinder</transport> - <version>1.0</version> - <interface> - <name>IThermal</name> - <instance>default</instance> - </interface> - </hal> - <hal format="hidl"> <name>android.hardware.light</name> <transport>hwbinder</transport> <version>2.0</version> diff --git a/sepolicy/file.te b/sepolicy/file.te index 5aa4025..53dfbc7 100755 --- a/sepolicy/file.te +++ b/sepolicy/file.te @@ -61,7 +61,6 @@ type sysfs_store, fs_type, sysfs_type; type sysfs_defendkey, fs_type, sysfs_type; #type sysfs_usb, fs_type, sysfs_type; type sysfs_boottype, fs_type, sysfs_type; -#type sysfs_thermal, fs_type, sysfs_type; type sysfs_amhdmitx, fs_type, sysfs_type; type sysfs_amvdec, fs_type, sysfs_type; type sysfs_remote, fs_type, sysfs_type; diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts index 92f55f0..a3d9f80 100755 --- a/sepolicy/file_contexts +++ b/sepolicy/file_contexts @@ -210,7 +210,11 @@ /sys/class/android_usb(/.*)? u:object_r:sysfs_usb:s0 /sys/class/dual_role_usb(/.*)? u:object_r:sysfs_usb:s0 /sys/power/boot_type u:object_r:sysfs_boottype:s0 -/sys/class/thermal/thermal_zone0/temp u:object_r:sysfs_thermal:s0 +#/sys/class/thermal/thermal_zone0/temp u:object_r:sysfs_thermal:s0 + +/sys/devices/virtual/thermal/thermal_zone[0-1](/.*) u:object_r:sysfs_thermal:s0 +/sys/devices/virtual/thermal/cooling_device[0-3](/.*) u:object_r:sysfs_thermal:s0 + /sys/class/amhdmitx/amhdmitx0/sink_type u:object_r:sysfs_amhdmitx:s0 /sys/class/amhdmitx/amhdmitx0/edid_parsing u:object_r:sysfs_amhdmitx:s0 /sys/class/amhdmitx/amhdmitx0/hdcp_mode u:object_r:sysfs_amhdmitx:s0 @@ -301,6 +305,7 @@ /vendor/bin/hw/android\.hardware\.drm@1\.2-service\.clearkey u:object_r:hal_drm_clearkey_exec:s0 /vendor/bin/hw/android\.hardware\.power\.stats@1\.0-service\.mock u:object_r:hal_power_stats_default_exec:s0 /vendor/bin/hw/android\.hardware\.graphics\.composer@2\.3-service\.droidlogic u:object_r:hal_graphics_composer_default_exec:s0 +/vendor/bin/hw/android\.hardware\.thermal@2\.0-service.droidlogic u:object_r:hal_thermal_default_exec:s0 /data/vendor/mediadrm(/.*)? u:object_r:hal_drm_data:s0 diff --git a/sepolicy/hal_thermal_default.te b/sepolicy/hal_thermal_default.te index 815a6cb..6d27168 100644 --- a/sepolicy/hal_thermal_default.te +++ b/sepolicy/hal_thermal_default.te @@ -1,3 +1,7 @@ allow hal_thermal_default sysfs:dir { open read }; allow hal_thermal_default sysfs:file { open read }; allow hal_thermal_default proc_stat:file { r_file_perms }; + +allow hal_thermal_default sysfs_thermal:file r_file_perms; +allow hal_thermal_default self:netlink_kobject_uevent_socket { create setopt getopt bind read }; + diff --git a/thermal_info_config.json b/thermal_info_config.json new file mode 100755 index 0000000..53f38f4 --- a/dev/null +++ b/thermal_info_config.json @@ -0,0 +1,29 @@ +{ + "Sensors":[ + { + "Name":"soc_thermal", + "Type":"CPU", + "HotThreshold":[ + "NAN", + 65.0, + 75.0, + 95.0, + "NAN", + 105.0, + 110.0 + ], + "Multiplier":0.001, + "Monitor":true + } + ], + "CoolingDevices":[ + { + "Name":"thermal-cpufreq-0", + "Type":"CPU" + }, + { + "Name":"thermal-gpufreq-0", + "Type":"GPU" + } + ] +} |