From 21709594db29e6439c39d49ba518c7272c3a5957 Mon Sep 17 00:00:00 2001 From: samou Date: Thu, 14 Mar 2024 09:39:09 +0000 Subject: [PATCH] Reapply "bm: add mitigation config file for caimito" This reverts commit 43f80c6d449c35ec4273e20c86afe136d52f478b. Change-Id: Iaf3f6c3ab3656ddb5b0ba51464eba19641d3ff26 --- battery_mitigation/bm_config_caiman.json | 18 ++++++++++++++++++ battery_mitigation/bm_config_komodo.json | 18 ++++++++++++++++++ .../bm_config_ripcurrentpro.json | 11 +++++++++++ battery_mitigation/bm_config_tokay.json | 18 ++++++++++++++++++ device-caimito-common.mk | 8 ++++++++ 5 files changed, 73 insertions(+) create mode 100644 battery_mitigation/bm_config_caiman.json create mode 100644 battery_mitigation/bm_config_komodo.json create mode 100644 battery_mitigation/bm_config_ripcurrentpro.json create mode 100644 battery_mitigation/bm_config_tokay.json diff --git a/battery_mitigation/bm_config_caiman.json b/battery_mitigation/bm_config_caiman.json new file mode 100644 index 00000000..876f8f1f --- /dev/null +++ b/battery_mitigation/bm_config_caiman.json @@ -0,0 +1,18 @@ +{ + "MitigationMethod":[ + { + "Name":"AUDIO_MITIGATION", + "Module":"AUDIO", + "Trigger":["OILO1"], + "State":["LIGHT", "MEDIUM", "HEAVY", "DISABLED"], + "Condition":"BASIC" + }, + { + "Name":"UNDEFINED", + "Module":"UNDEFINED", + "Trigger":["OILO1", "OILO2", "UVLO1", "UVLO2", "SMPL"], + "State":["START", "LIGHT", "MEDIUM", "HEAVY", "DISABLED"], + "Condition":"BASIC" + } + ] +} diff --git a/battery_mitigation/bm_config_komodo.json b/battery_mitigation/bm_config_komodo.json new file mode 100644 index 00000000..876f8f1f --- /dev/null +++ b/battery_mitigation/bm_config_komodo.json @@ -0,0 +1,18 @@ +{ + "MitigationMethod":[ + { + "Name":"AUDIO_MITIGATION", + "Module":"AUDIO", + "Trigger":["OILO1"], + "State":["LIGHT", "MEDIUM", "HEAVY", "DISABLED"], + "Condition":"BASIC" + }, + { + "Name":"UNDEFINED", + "Module":"UNDEFINED", + "Trigger":["OILO1", "OILO2", "UVLO1", "UVLO2", "SMPL"], + "State":["START", "LIGHT", "MEDIUM", "HEAVY", "DISABLED"], + "Condition":"BASIC" + } + ] +} diff --git a/battery_mitigation/bm_config_ripcurrentpro.json b/battery_mitigation/bm_config_ripcurrentpro.json new file mode 100644 index 00000000..7848d87f --- /dev/null +++ b/battery_mitigation/bm_config_ripcurrentpro.json @@ -0,0 +1,11 @@ +{ + "MitigationMethod":[ + { + "Name":"UNDEFINED", + "Module":"UNDEFINED", + "Trigger":["OILO1", "OILO2", "UVLO1", "UVLO2", "SMPL"], + "State":["START", "LIGHT", "MEDIUM", "HEAVY", "DISABLED"], + "Condition":"BASIC" + } + ] +} diff --git a/battery_mitigation/bm_config_tokay.json b/battery_mitigation/bm_config_tokay.json new file mode 100644 index 00000000..876f8f1f --- /dev/null +++ b/battery_mitigation/bm_config_tokay.json @@ -0,0 +1,18 @@ +{ + "MitigationMethod":[ + { + "Name":"AUDIO_MITIGATION", + "Module":"AUDIO", + "Trigger":["OILO1"], + "State":["LIGHT", "MEDIUM", "HEAVY", "DISABLED"], + "Condition":"BASIC" + }, + { + "Name":"UNDEFINED", + "Module":"UNDEFINED", + "Trigger":["OILO1", "OILO2", "UVLO1", "UVLO2", "SMPL"], + "State":["START", "LIGHT", "MEDIUM", "HEAVY", "DISABLED"], + "Condition":"BASIC" + } + ] +} diff --git a/device-caimito-common.mk b/device-caimito-common.mk index 2c13c015..d5ade64d 100644 --- a/device-caimito-common.mk +++ b/device-caimito-common.mk @@ -39,3 +39,11 @@ PRODUCT_COPY_FILES += \ $(TARGET_VENDOR_PERF_CONFIG_PATH)/powerhint-$(TARGET_DEVICE).json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint.json PRODUCT_COPY_FILES += \ $(TARGET_VENDOR_PERF_CONFIG_PATH)/powerhint-zuma.json:$(TARGET_COPY_OUT_VENDOR)/etc/powerhint-proto.json + +# Battery Mitigation Config +ifeq (,$(TARGET_VENDOR_BATTERY_MITIGATION_CONFIG_PATH)) +TARGET_VENDOR_BATTERY_MITIGATION_CONFIG_PATH := device/google/caimito/battery_mitigation +endif + +PRODUCT_COPY_FILES += \ + $(TARGET_VENDOR_BATTERY_MITIGATION_CONFIG_PATH)/bm_config_$(TARGET_DEVICE).json:$(TARGET_COPY_OUT_VENDOR)/etc/bm_config.json