sm6250-common: thermal: Rebrand to Xiaomi SM6250

Change-Id: Iafa72da14648a2652df9b64a02dd6e5b9fa8bd9b
This commit is contained in:
Alexander Winkowski 2021-08-06 08:29:39 +02:00
parent 46df85c08a
commit cefd104891
No known key found for this signature in database
GPG Key ID: 72762A66704CDE44
8 changed files with 9 additions and 57 deletions

View File

@ -353,7 +353,7 @@ PRODUCT_BOOT_JARS += \
# Thermal HAL
PRODUCT_PACKAGES += \
android.hardware.thermal@2.0-service.pixel
android.hardware.thermal@2.0-service.xiaomi_atoll
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/configs/thermal_info_config.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json

View File

@ -8,4 +8,4 @@
/vendor/bin/hw/android\.hardware\.power-service\.xiaomi-libperfmgr u:object_r:hal_power_default_exec:s0
# 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

View File

@ -1,13 +1,13 @@
cc_binary {
name: "android.hardware.thermal@2.0-service.pixel",
name: "android.hardware.thermal@2.0-service.xiaomi_atoll",
defaults: [
"hidl_defaults",
],
vendor: true,
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: [
"android.hardware.thermal@2.0-service.pixel.rc",
"android.hardware.thermal@2.0-service.xiaomi_atoll.rc",
],
srcs: [
"service.cpp",
@ -45,12 +45,3 @@ cc_binary {
"-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",
],
}

View File

@ -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@2.0::IThermal default
class hal

View File

@ -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

View File

@ -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

View File

@ -29,7 +29,7 @@ using ::android::hardware::thermal::V2_0::IThermal;
using ::android::hardware::thermal::V2_0::implementation::Thermal;
static int shutdown() {
LOG(ERROR) << "Pixel Thermal HAL Service is shutting down.";
LOG(ERROR) << "Xiaomi SM6250 Thermal HAL Service is shutting down.";
return 1;
}
@ -37,7 +37,7 @@ int main(int /* argc */, char ** /* argv */) {
status_t status;
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();
if (service == nullptr) {
@ -53,7 +53,7 @@ int main(int /* argc */, char ** /* argv */) {
return shutdown();
}
LOG(INFO) << "Pixel Thermal HAL Service 2.0 started successfully.";
LOG(INFO) << "Xiaomi SM6250 Thermal HAL Service 2.0 started successfully.";
joinRpcThreadpool();
// We should not get past the joinRpcThreadpool().
return shutdown();