config: Move Lineage PowerShare HAL to select()

Change-Id: If687bda38370e8dc664cef26fbb907202444d049
This commit is contained in:
Michael Bestas
2025-04-24 22:50:34 +03:00
committed by Bruno Martins
parent 1c1551858c
commit 92164a2390
2 changed files with 11 additions and 35 deletions

View File

@@ -194,30 +194,3 @@ bootloader_message_offset {
},
},
}
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\""],
},
},
}

View File

@@ -33,9 +33,6 @@ SOONG_CONFIG_lineageGlobalVars += \
camera_override_format_from_reserved \
target_init_vendor_lib \
target_power_libperfmgr_mode_extension_lib \
target_powershare_path \
target_powershare_enabled \
target_powershare_disabled \
target_trust_usb_control_path \
target_trust_usb_control_enable \
target_trust_usb_control_disable
@@ -49,8 +46,6 @@ TARGET_ADDITIONAL_GRALLOC_10_USAGE_BITS ?= 0
TARGET_CAMERA_OVERRIDE_FORMAT_FROM_RESERVED ?= false
TARGET_INIT_VENDOR_LIB ?= vendor_init
TARGET_POWER_LIBPERFMGR_MODE_EXTENSION_LIB ?= libperfmgr-ext
TARGET_POWERSHARE_ENABLED ?= 1
TARGET_POWERSHARE_DISABLED ?= 0
TARGET_TRUST_USB_CONTROL_PATH ?= /proc/sys/kernel/deny_new_usb
TARGET_TRUST_USB_CONTROL_ENABLE ?= 1
TARGET_TRUST_USB_CONTROL_DISABLE ?= 0
@@ -60,9 +55,6 @@ SOONG_CONFIG_lineageGlobalVars_additional_gralloc_10_usage_bits := $(TARGET_ADDI
SOONG_CONFIG_lineageGlobalVars_bootloader_message_offset := $(BOOTLOADER_MESSAGE_OFFSET)
SOONG_CONFIG_lineageGlobalVars_target_init_vendor_lib := $(TARGET_INIT_VENDOR_LIB)
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_trust_usb_control_path := $(TARGET_TRUST_USB_CONTROL_PATH)
SOONG_CONFIG_lineageGlobalVars_target_trust_usb_control_enable := $(TARGET_TRUST_USB_CONTROL_ENABLE)
SOONG_CONFIG_lineageGlobalVars_target_trust_usb_control_disable := $(TARGET_TRUST_USB_CONTROL_DISABLE)
@@ -93,6 +85,17 @@ ifneq ($(TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_TOGGLE),)
$(call soong_config_set,lineage_health,charging_control_supports_toggle,$(TARGET_HEALTH_CHARGING_CONTROL_SUPPORTS_TOGGLE))
endif
# Lineage PowerShare HAL
ifneq ($(TARGET_POWERSHARE_PATH),)
$(call soong_config_set,lineage_powershare,powershare_path,$(TARGET_POWERSHARE_PATH))
endif
ifneq ($(TARGET_POWERSHARE_ENABLED),)
$(call soong_config_set,lineage_powershare,powershare_enabled,$(TARGET_POWERSHARE_ENABLED))
endif
ifneq ($(TARGET_POWERSHARE_DISABLED),)
$(call soong_config_set,lineage_powershare,powershare_disabled,$(TARGET_POWERSHARE_DISABLED))
endif
# Surfaceflinger
ifneq ($(TARGET_SURFACEFLINGER_UDFPS_LIB),)
$(call soong_config_set,surfaceflinger,udfps_lib,$(TARGET_SURFACEFLINGER_UDFPS_LIB))