Skip to content

Commit

Permalink
soong: add powershare configs
Browse files Browse the repository at this point in the history
Change-Id: Ia0654765e45b9b36caca680eac134c714dcb4da0
  • Loading branch information
Demon000 authored and luk1337 committed Aug 22, 2024
1 parent 8c9d8a4 commit 1989665
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
27 changes: 27 additions & 0 deletions build/soong/Android.bp
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,33 @@ health_charging_control {
},
}

soong_config_module_type {
name: "powershare",
module_type: "cc_defaults",
config_namespace: "lineageGlobalVars",
value_variables: [
"target_powershare_path",
"target_powershare_enabled",
"target_powershare_disabled",
],
properties: ["cppflags"],
}

powershare {
name: "powershare_defaults",
soong_config_variables: {
target_powershare_path: {
cppflags: ["-DPOWERSHARE_PATH=\"%s\""],
},
target_powershare_enabled: {
cppflags: ["-DPOWERSHARE_ENABLED=\"%s\""],
},
target_powershare_disabled: {
cppflags: ["-DPOWERSHARE_DISABLED=\"%s\""],
},
},
}

// NVIDIA specific config modules
soong_config_module_type {
name: "nvidia_enhancements",
Expand Down
8 changes: 8 additions & 0 deletions config/BoardConfigSoong.mk
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ SOONG_CONFIG_lineageGlobalVars += \
target_init_vendor_lib \
target_ld_shim_libs \
target_power_libperfmgr_mode_extension_lib \
target_powershare_path \
target_powershare_enabled \
target_powershare_disabled \
target_surfaceflinger_udfps_lib \
target_trust_usb_control_path \
target_trust_usb_control_enable \
Expand Down Expand Up @@ -93,6 +96,8 @@ TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_DEADLINE ?= false
TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_TOGGLE ?= true
TARGET_INIT_VENDOR_LIB ?= vendor_init
TARGET_POWER_LIBPERFMGR_MODE_EXTENSION_LIB ?= libperfmgr-ext
TARGET_POWERSHARE_ENABLED ?= 1
TARGET_POWERSHARE_DISABLED ?= 0
TARGET_QTI_VIBRATOR_EFFECT_LIB ?= libqtivibratoreffect
TARGET_SURFACEFLINGER_UDFPS_LIB ?= surfaceflinger_udfps_lib
TARGET_TRUST_USB_CONTROL_PATH ?= /proc/sys/kernel/deny_new_usb
Expand All @@ -113,6 +118,9 @@ SOONG_CONFIG_lineageGlobalVars_target_health_charging_control_supports_toggle :=
SOONG_CONFIG_lineageGlobalVars_target_init_vendor_lib := $(TARGET_INIT_VENDOR_LIB)
SOONG_CONFIG_lineageGlobalVars_target_ld_shim_libs := $(subst $(space),:,$(TARGET_LD_SHIM_LIBS))
SOONG_CONFIG_lineageGlobalVars_target_power_libperfmgr_mode_extension_lib := $(TARGET_POWER_LIBPERFMGR_MODE_EXTENSION_LIB)
SOONG_CONFIG_lineageGlobalVars_target_powershare_path := $(TARGET_POWERSHARE_PATH)
SOONG_CONFIG_lineageGlobalVars_target_powershare_enabled := $(TARGET_POWERSHARE_ENABLED)
SOONG_CONFIG_lineageGlobalVars_target_powershare_disabled := $(TARGET_POWERSHARE_DISABLED)
SOONG_CONFIG_lineageGlobalVars_target_surfaceflinger_udfps_lib := $(TARGET_SURFACEFLINGER_UDFPS_LIB)
SOONG_CONFIG_lineageGlobalVars_target_trust_usb_control_path := $(TARGET_TRUST_USB_CONTROL_PATH)
SOONG_CONFIG_lineageGlobalVars_target_trust_usb_control_enable := $(TARGET_TRUST_USB_CONTROL_ENABLE)
Expand Down

0 comments on commit 1989665

Please sign in to comment.