soong: Implement charge limit mode

Change-Id: Ic14335339528ae11ac25ae1d09bb705708c29008
Signed-off-by: micky387 <mickaelsaibi@free.fr>
diff --git a/config/Android.bp b/config/Android.bp
index ffee4e2..c94ae49 100644
--- a/config/Android.bp
+++ b/config/Android.bp
@@ -69,6 +69,7 @@
         "target_health_charging_control_supports_toggle",
         "target_health_charging_control_supports_bypass",
         "target_health_charging_control_supports_deadline",
+        "target_health_charging_control_supports_limit",
     ],
     value_variables: [
         "target_health_charging_control_charging_path",
@@ -90,6 +91,9 @@
         target_health_charging_control_supports_deadline: {
             cppflags: ["-DHEALTH_CHARGING_CONTROL_SUPPORTS_DEADLINE"],
         },
+        target_health_charging_control_supports_limit: {
+            cppflags: ["-DHEALTH_CHARGING_CONTROL_SUPPORTS_LIMIT"],
+        },
         target_health_charging_control_charging_path: {
             cppflags: ["-DHEALTH_CHARGING_CONTROL_CHARGING_PATH=\"%s\""],
         },
diff --git a/config/BoardConfigSoong.mk b/config/BoardConfigSoong.mk
index 61d44b3..d40bc17 100644
--- a/config/BoardConfigSoong.mk
+++ b/config/BoardConfigSoong.mk
@@ -34,6 +34,7 @@
     target_health_charging_control_deadline_path \
     target_health_charging_control_supports_bypass \
     target_health_charging_control_supports_deadline \
+    target_health_charging_control_supports_limit \
     target_health_charging_control_supports_toggle \
     target_init_vendor_lib \
     target_power_libperfmgr_mode_extension_lib \
@@ -95,6 +96,7 @@
 TARGET_HEALTH_CHARGING_CONTROL_CHARGING_DISABLED ?= 0
 TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_BYPASS ?= true
 TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_DEADLINE ?= false
+TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_LIMIT ?= false
 TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_TOGGLE ?= true
 TARGET_INIT_VENDOR_LIB ?= vendor_init
 TARGET_POWER_LIBPERFMGR_MODE_EXTENSION_LIB ?= libperfmgr-ext
@@ -118,6 +120,7 @@
 SOONG_CONFIG_omniGlobalVars_target_health_charging_control_deadline_path := $(TARGET_HEALTH_CHARGING_CONTROL_DEADLINE_PATH)
 SOONG_CONFIG_omniGlobalVars_target_health_charging_control_supports_bypass := $(TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_BYPASS)
 SOONG_CONFIG_omniGlobalVars_target_health_charging_control_supports_deadline := $(TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_DEADLINE)
+SOONG_CONFIG_omniGlobalVars_target_health_charging_control_supports_limit := $(TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_LIMIT)
 SOONG_CONFIG_omniGlobalVars_target_health_charging_control_supports_toggle := $(TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_TOGGLE)
 SOONG_CONFIG_omniGlobalVars_target_init_vendor_lib := $(TARGET_INIT_VENDOR_LIB)
 SOONG_CONFIG_omniGlobalVars_target_power_libperfmgr_mode_extension_lib := $(TARGET_POWER_LIBPERFMGR_MODE_EXTENSION_LIB)