mirror of
https://github.com/PixelExperience-Devices/device_xiaomi_sm6250-common.git
synced 2025-04-29 02:27:21 +09:00
sm6250-common: thermal: Rebrand to Xiaomi SM6250
Change-Id: Iafa72da14648a2652df9b64a02dd6e5b9fa8bd9b
This commit is contained in:
parent
46df85c08a
commit
cefd104891
2
atoll.mk
2
atoll.mk
@ -353,7 +353,7 @@ PRODUCT_BOOT_JARS += \
|
|||||||
|
|
||||||
# Thermal HAL
|
# Thermal HAL
|
||||||
PRODUCT_PACKAGES += \
|
PRODUCT_PACKAGES += \
|
||||||
android.hardware.thermal@2.0-service.pixel
|
android.hardware.thermal@2.0-service.xiaomi_atoll
|
||||||
|
|
||||||
PRODUCT_COPY_FILES += \
|
PRODUCT_COPY_FILES += \
|
||||||
$(LOCAL_PATH)/configs/thermal_info_config.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json
|
$(LOCAL_PATH)/configs/thermal_info_config.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json
|
||||||
|
2
sepolicy/vendor/file_contexts
vendored
2
sepolicy/vendor/file_contexts
vendored
@ -8,4 +8,4 @@
|
|||||||
/vendor/bin/hw/android\.hardware\.power-service\.xiaomi-libperfmgr u:object_r:hal_power_default_exec:s0
|
/vendor/bin/hw/android\.hardware\.power-service\.xiaomi-libperfmgr u:object_r:hal_power_default_exec:s0
|
||||||
|
|
||||||
# Thermal
|
# Thermal
|
||||||
/vendor/bin/hw/android\.hardware\.thermal@2\.0-service\.pixel u:object_r:hal_thermal_default_exec:s0
|
/vendor/bin/hw/android\.hardware\.thermal@2\.0-service\.xiaomi_atoll u:object_r:hal_thermal_default_exec:s0
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
cc_binary {
|
cc_binary {
|
||||||
name: "android.hardware.thermal@2.0-service.pixel",
|
name: "android.hardware.thermal@2.0-service.xiaomi_atoll",
|
||||||
defaults: [
|
defaults: [
|
||||||
"hidl_defaults",
|
"hidl_defaults",
|
||||||
],
|
],
|
||||||
vendor: true,
|
vendor: true,
|
||||||
relative_install_path: "hw",
|
relative_install_path: "hw",
|
||||||
vintf_fragments: ["android.hardware.thermal@2.0-service.pixel.xml"],
|
vintf_fragments: ["android.hardware.thermal@2.0-service.xiaomi_atoll.xml"],
|
||||||
init_rc: [
|
init_rc: [
|
||||||
"android.hardware.thermal@2.0-service.pixel.rc",
|
"android.hardware.thermal@2.0-service.xiaomi_atoll.rc",
|
||||||
],
|
],
|
||||||
srcs: [
|
srcs: [
|
||||||
"service.cpp",
|
"service.cpp",
|
||||||
@ -45,12 +45,3 @@ cc_binary {
|
|||||||
"-warnings-as-errors=android-*,clang-analyzer-security*,cert-*"
|
"-warnings-as-errors=android-*,clang-analyzer-security*,cert-*"
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
sh_binary {
|
|
||||||
name: "thermal_logd",
|
|
||||||
src: "init.thermal.logging.sh",
|
|
||||||
vendor: true,
|
|
||||||
init_rc: [
|
|
||||||
"pixel-thermal-logd.rc",
|
|
||||||
],
|
|
||||||
}
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
service vendor.thermal-hal-2-0 /vendor/bin/hw/android.hardware.thermal@2.0-service.pixel
|
service vendor.thermal-hal-2-0 /vendor/bin/hw/android.hardware.thermal@2.0-service.xiaomi_atoll
|
||||||
interface android.hardware.thermal@1.0::IThermal default
|
interface android.hardware.thermal@1.0::IThermal default
|
||||||
interface android.hardware.thermal@2.0::IThermal default
|
interface android.hardware.thermal@2.0::IThermal default
|
||||||
class hal
|
class hal
|
@ -1,25 +0,0 @@
|
|||||||
#!/vendor/bin/sh
|
|
||||||
|
|
||||||
if [ $# -eq 1 ]; then
|
|
||||||
interval=$1
|
|
||||||
else
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
while true
|
|
||||||
do
|
|
||||||
logline="tz:"
|
|
||||||
for f in /sys/class/thermal/thermal*
|
|
||||||
do
|
|
||||||
temp=`cat $f/temp`
|
|
||||||
logline+="|$temp"
|
|
||||||
done
|
|
||||||
logline+=" cdev:"
|
|
||||||
for f in /sys/class/thermal/cooling_device*
|
|
||||||
do
|
|
||||||
cur_state=`cat $f/cur_state`
|
|
||||||
logline+="|$cur_state"
|
|
||||||
done
|
|
||||||
log -p w -t THERMAL_LOG $logline
|
|
||||||
sleep $interval
|
|
||||||
done
|
|
@ -1,14 +0,0 @@
|
|||||||
on property:persist.vendor.log.thermal=1
|
|
||||||
start vendor.thermal.logd
|
|
||||||
|
|
||||||
on property:persist.vendor.log.thermal=0
|
|
||||||
stop vendor.thermal.logd
|
|
||||||
|
|
||||||
on property:persist.vendor.log.thermal=1 && property:persist.vendor.log.thermal.interval=*
|
|
||||||
restart vendor.thermal.logd
|
|
||||||
|
|
||||||
service vendor.thermal.logd /vendor/bin/thermal_logd ${persist.vendor.log.thermal.interval:-5}
|
|
||||||
class main
|
|
||||||
user root
|
|
||||||
group root system
|
|
||||||
disabled
|
|
@ -29,7 +29,7 @@ using ::android::hardware::thermal::V2_0::IThermal;
|
|||||||
using ::android::hardware::thermal::V2_0::implementation::Thermal;
|
using ::android::hardware::thermal::V2_0::implementation::Thermal;
|
||||||
|
|
||||||
static int shutdown() {
|
static int shutdown() {
|
||||||
LOG(ERROR) << "Pixel Thermal HAL Service is shutting down.";
|
LOG(ERROR) << "Xiaomi SM6250 Thermal HAL Service is shutting down.";
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ int main(int /* argc */, char ** /* argv */) {
|
|||||||
status_t status;
|
status_t status;
|
||||||
android::sp<IThermal> service = nullptr;
|
android::sp<IThermal> service = nullptr;
|
||||||
|
|
||||||
LOG(INFO) << "Pixel Thermal HAL Service 2.0 starting...";
|
LOG(INFO) << "Xiaomi SM6250 Thermal HAL Service 2.0 starting...";
|
||||||
|
|
||||||
service = new Thermal();
|
service = new Thermal();
|
||||||
if (service == nullptr) {
|
if (service == nullptr) {
|
||||||
@ -53,7 +53,7 @@ int main(int /* argc */, char ** /* argv */) {
|
|||||||
return shutdown();
|
return shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(INFO) << "Pixel Thermal HAL Service 2.0 started successfully.";
|
LOG(INFO) << "Xiaomi SM6250 Thermal HAL Service 2.0 started successfully.";
|
||||||
joinRpcThreadpool();
|
joinRpcThreadpool();
|
||||||
// We should not get past the joinRpcThreadpool().
|
// We should not get past the joinRpcThreadpool().
|
||||||
return shutdown();
|
return shutdown();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user