From e05a45ac1b65cdf1c64b43fb61847937e3022750 Mon Sep 17 00:00:00 2001 From: samou Date: Tue, 27 Feb 2024 08:22:45 +0000 Subject: [PATCH] bm: add mitigation config file for caimito Bug: 319619657 Change-Id: I76cf52eaccfac00eb177752e5105eaabdae2e4c6 Signed-off-by: samou --- 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