powershare: Make WIRELESS_TX_ENABLE_PATH configurable via Soong flag

Change-Id: I73a42f167c9d332f05e23bd00db19c0a1f9fe672
This commit is contained in:
LuK1337 2021-09-19 18:09:57 +02:00 committed by Sebastiano Barezzi
parent ac68cfefd7
commit 04053365b2
No known key found for this signature in database
GPG Key ID: 47760583F393BC44
2 changed files with 21 additions and 3 deletions

View File

@ -4,9 +4,29 @@
// SPDX-License-Identifier: Apache-2.0
//
soong_config_module_type {
name: "xiaomi_powershare_hal_cc_defaults",
module_type: "cc_defaults",
config_namespace: "XIAOMI_POWERSHARE",
value_variables: ["WIRELESS_TX_ENABLE_PATH"],
properties: ["cppflags"],
}
xiaomi_powershare_hal_cc_defaults {
name: "xiaomi_powershare_hal_defaults",
soong_config_variables: {
WIRELESS_TX_ENABLE_PATH: {
cppflags: ["-DWIRELESS_TX_ENABLE_PATH=\"%s\""],
},
},
}
cc_binary {
name: "vendor.lineage.powershare@1.0-service.xiaomi",
defaults: ["hidl_defaults"],
defaults: [
"hidl_defaults",
"xiaomi_powershare_hal_defaults",
],
relative_install_path: "hw",
init_rc: ["vendor.lineage.powershare@1.0-service.xiaomi.rc"],
vintf_fragments: ["vendor.lineage.powershare@1.0-service.xiaomi.xml"],

View File

@ -16,8 +16,6 @@ namespace powershare {
namespace V1_0 {
namespace implementation {
#define WIRELESS_TX_ENABLE_PATH "/proc/wireless/enable_tx"
/*
* Write value to path and close file.
*/