From 77e6c02e7c6ee3238876c3546917ec0acab84af1 Mon Sep 17 00:00:00 2001 From: Andrew Chant Date: Fri, 28 Apr 2023 19:57:31 -0700 Subject: [PATCH] shusky: move perf/thermal configs around Move shusky thermal .json files into thermal/ and perf configs into perf/. Also move the configs into device-shusky-common.mk, allowing override of the config file path. Bug: 277993984 Change-Id: Ifa2882ee9c27c57d967c27f9f8e8edaff313e2d5 --- OWNERS | 2 +- device-husky.mk | 9 ----- device-ripcurrent.mk | 8 ----- device-shiba.mk | 9 ----- device-shusky-common.mk | 33 +++++++++++++++++++ husky/BoardConfig.mk | 2 ++ .../powerhint-husky.json | 0 .../powerhint-ripcurrent.json | 0 .../powerhint-shiba.json | 0 ripcurrent/BoardConfig.mk | 2 ++ shiba/BoardConfig.mk | 2 ++ .../thermal_info_config_charge_husky.json | 0 ...thermal_info_config_charge_ripcurrent.json | 0 .../thermal_info_config_charge_shiba.json | 0 .../thermal_info_config_husky.json | 0 .../thermal_info_config_ripcurrent.json | 0 .../thermal_info_config_shiba.json | 0 17 files changed, 40 insertions(+), 27 deletions(-) create mode 100644 device-shusky-common.mk rename powerhint-husky.json => perf/powerhint-husky.json (100%) rename powerhint-ripcurrent.json => perf/powerhint-ripcurrent.json (100%) rename powerhint-shiba.json => perf/powerhint-shiba.json (100%) rename thermal_info_config_charge_husky.json => thermal/thermal_info_config_charge_husky.json (100%) rename thermal_info_config_charge_ripcurrent.json => thermal/thermal_info_config_charge_ripcurrent.json (100%) rename thermal_info_config_charge_shiba.json => thermal/thermal_info_config_charge_shiba.json (100%) rename thermal_info_config_husky.json => thermal/thermal_info_config_husky.json (100%) rename thermal_info_config_ripcurrent.json => thermal/thermal_info_config_ripcurrent.json (100%) rename thermal_info_config_shiba.json => thermal/thermal_info_config_shiba.json (100%) diff --git a/OWNERS b/OWNERS index e490cb5..492973e 100644 --- a/OWNERS +++ b/OWNERS @@ -1,4 +1,4 @@ -per-file powerhint-*.json = jenhaochen@google.com,wvw@google.com,joaodias@google.com +per-file perf/*,thermal/*= jenhaochen@google.com,wvw@google.com,joaodias@google.com # per-file for Pixel device makefiles, see go/pixel-device-mk-owner-checklist for details. per-file *.mk,*/BoardConfig.mk=file:device/google/gs-common:master:/OWNERS diff --git a/device-husky.mk b/device-husky.mk index 1efece2..8d90d79 100644 --- a/device-husky.mk +++ b/device-husky.mk @@ -83,15 +83,6 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.uicc.xml \ device/google/shusky/nfc/libse-gto-hal.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal.conf -# Thermal Config -PRODUCT_COPY_FILES += \ - device/google/shusky/thermal_info_config_husky.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \ - device/google/shusky/thermal_info_config_charge_husky.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_charge.json - -# Power HAL config -PRODUCT_COPY_FILES += \ - device/google/shusky/powerhint-husky.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json - # Bluetooth HAL PRODUCT_COPY_FILES += \ device/google/shusky/bluetooth/bt_vendor_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth/bt_vendor_overlay.conf diff --git a/device-ripcurrent.mk b/device-ripcurrent.mk index 2ef1b0c..cae2ccd 100644 --- a/device-ripcurrent.mk +++ b/device-ripcurrent.mk @@ -78,14 +78,6 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.uicc.xml \ device/google/shusky/nfc/libse-gto-hal-disable.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal.conf -# Thermal Config -PRODUCT_COPY_FILES += \ - device/google/shusky/thermal_info_config_ripcurrent.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \ - device/google/shusky/thermal_info_config_charge_ripcurrent.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_charge.json - -# Power HAL config -PRODUCT_COPY_FILES += \ - device/google/shusky/powerhint-ripcurrent.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json # Bluetooth HAL PRODUCT_COPY_FILES += \ diff --git a/device-shiba.mk b/device-shiba.mk index c858df2..4d6a242 100644 --- a/device-shiba.mk +++ b/device-shiba.mk @@ -74,15 +74,6 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.se.omapi.uicc.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.se.omapi.uicc.xml \ device/google/shusky/nfc/libse-gto-hal.conf:$(TARGET_COPY_OUT_VENDOR)/etc/libse-gto-hal.conf -# Thermal Config -PRODUCT_COPY_FILES += \ - device/google/shusky/thermal_info_config_shiba.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \ - device/google/shusky/thermal_info_config_charge_shiba.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_charge.json - -# Power HAL config -PRODUCT_COPY_FILES += \ - device/google/shusky/powerhint-shiba.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json - # Bluetooth HAL PRODUCT_COPY_FILES += \ device/google/shusky/bluetooth/bt_vendor_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth/bt_vendor_overlay.conf diff --git a/device-shusky-common.mk b/device-shusky-common.mk new file mode 100644 index 0000000..3307540 --- /dev/null +++ b/device-shusky-common.mk @@ -0,0 +1,33 @@ +# +# Copyright (C) 2023 The Android Open-Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + + +# Thermal Config +ifeq (,$(TARGET_VENDOR_THERMAL_CONFIG_PATH)) +TARGET_VENDOR_THERMAL_CONFIG_PATH := device/google/shusky/thermal +endif + +PRODUCT_COPY_FILES += \ + $(TARGET_VENDOR_THERMAL_CONFIG_PATH)/thermal_info_config_$(TARGET_DEVICE).json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \ + $(TARGET_VENDOR_THERMAL_CONFIG_PATH)/thermal_info_config_charge_$(TARGET_DEVICE).json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_charge.json + +# Power HAL config +ifeq (,$(TARGET_VENDOR_PERF_CONFIG_PATH)) +TARGET_VENDOR_PERF_CONFIG_PATH := device/google/shusky/perf +endif + +PRODUCT_COPY_FILES += \ + $(TARGET_VENDOR_PERF_CONFIG_PATH)/powerhint-$(TARGET_DEVICE).json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json diff --git a/husky/BoardConfig.mk b/husky/BoardConfig.mk index 205ca79..e2fbeac 100644 --- a/husky/BoardConfig.mk +++ b/husky/BoardConfig.mk @@ -22,6 +22,8 @@ USES_DEVICE_GOOGLE_SHUSKY := true BOARD_KERNEL_CMDLINE += swiotlb=noforce BOARD_KERNEL_CMDLINE += disable_dma32=on +include device/google/shusky/device-shusky-common.mk + include device/google/zuma/BoardConfig-common.mk -include vendor/google_devices/zuma/prebuilts/BoardConfigVendor.mk -include vendor/google_devices/husky/proprietary/BoardConfigVendor.mk diff --git a/powerhint-husky.json b/perf/powerhint-husky.json similarity index 100% rename from powerhint-husky.json rename to perf/powerhint-husky.json diff --git a/powerhint-ripcurrent.json b/perf/powerhint-ripcurrent.json similarity index 100% rename from powerhint-ripcurrent.json rename to perf/powerhint-ripcurrent.json diff --git a/powerhint-shiba.json b/perf/powerhint-shiba.json similarity index 100% rename from powerhint-shiba.json rename to perf/powerhint-shiba.json diff --git a/ripcurrent/BoardConfig.mk b/ripcurrent/BoardConfig.mk index 1b5c405..7402055 100644 --- a/ripcurrent/BoardConfig.mk +++ b/ripcurrent/BoardConfig.mk @@ -20,6 +20,8 @@ TARGET_SCREEN_DENSITY := 440 BOARD_USES_GENERIC_AUDIO := true USES_DEVICE_GOOGLE_SHUSKY := true +include device/google/shusky/device-shusky-common.mk + include device/google/zuma/BoardConfig-common.mk -include vendor/google_devices/zuma/prebuilts/BoardConfigVendor.mk include device/google/shusky-sepolicy/ripcurrent-sepolicy.mk diff --git a/shiba/BoardConfig.mk b/shiba/BoardConfig.mk index 2acc2a4..13a0d25 100644 --- a/shiba/BoardConfig.mk +++ b/shiba/BoardConfig.mk @@ -22,6 +22,8 @@ USES_DEVICE_GOOGLE_SHUSKY := true BOARD_KERNEL_CMDLINE += swiotlb=noforce BOARD_KERNEL_CMDLINE += disable_dma32=on +include device/google/shusky/device-shusky-common.mk + include device/google/zuma/BoardConfig-common.mk -include vendor/google_devices/zuma/prebuilts/BoardConfigVendor.mk -include vendor/google_devices/shiba/proprietary/BoardConfigVendor.mk diff --git a/thermal_info_config_charge_husky.json b/thermal/thermal_info_config_charge_husky.json similarity index 100% rename from thermal_info_config_charge_husky.json rename to thermal/thermal_info_config_charge_husky.json diff --git a/thermal_info_config_charge_ripcurrent.json b/thermal/thermal_info_config_charge_ripcurrent.json similarity index 100% rename from thermal_info_config_charge_ripcurrent.json rename to thermal/thermal_info_config_charge_ripcurrent.json diff --git a/thermal_info_config_charge_shiba.json b/thermal/thermal_info_config_charge_shiba.json similarity index 100% rename from thermal_info_config_charge_shiba.json rename to thermal/thermal_info_config_charge_shiba.json diff --git a/thermal_info_config_husky.json b/thermal/thermal_info_config_husky.json similarity index 100% rename from thermal_info_config_husky.json rename to thermal/thermal_info_config_husky.json diff --git a/thermal_info_config_ripcurrent.json b/thermal/thermal_info_config_ripcurrent.json similarity index 100% rename from thermal_info_config_ripcurrent.json rename to thermal/thermal_info_config_ripcurrent.json diff --git a/thermal_info_config_shiba.json b/thermal/thermal_info_config_shiba.json similarity index 100% rename from thermal_info_config_shiba.json rename to thermal/thermal_info_config_shiba.json