sm8450-common: Build Lineage PowerShare HAL

Change-Id: I3ea02cd0c6b1a26851f1961768e00e5f3339c4bb
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
This commit is contained in:
Jens Reidel 2023-07-15 16:08:38 +03:00 committed by Arian
parent dc9bdf5c33
commit 8c6add2160
6 changed files with 20 additions and 0 deletions

View file

@ -190,6 +190,11 @@ TARGET_BOARD_PLATFORM := taro
# Power
TARGET_POWERHAL_MODE_EXT := $(COMMON_PATH)/power/power-mode.cpp
# PowerShare
SOONG_CONFIG_NAMESPACES += XIAOMI_POWERSHARE
SOONG_CONFIG_XIAOMI_POWERSHARE := WIRELESS_TX_ENABLE_PATH
SOONG_CONFIG_XIAOMI_POWERSHARE_WIRELESS_TX_ENABLE_PATH := /sys/class/qcom-battery/reverse_chg_mode
# Properties
TARGET_ODM_PROP += $(COMMON_PATH)/properties/odm.prop
TARGET_PRODUCT_PROP += $(COMMON_PATH)/properties/product.prop

View file

@ -366,6 +366,10 @@ PRODUCT_COPY_FILES += \
PRODUCT_PACKAGES += \
libgrpc++_unsecure.vendor
# PowerShare
PRODUCT_PACKAGES += \
vendor.lineage.powershare@1.0-service.xiaomi
# Protobuf
PRODUCT_PACKAGES += \
libprotobuf-cpp-full-3.9.1-vendorcompat \

View file

@ -504,3 +504,6 @@ subsystem mem_buf_vm
# devcoredump data attributes
/sys/class/devcoredump/devcd* data 0600 system system
# Battery
/sys/class/qcom-battery reverse_chg_mode 0644 system system

View file

@ -71,6 +71,9 @@
# Modem
/dev/smd8 u:object_r:vendor_radio_smd_device:s0
# Powershare
/vendor/bin/hw/vendor\.lineage\.powershare@1\.0-service\.xiaomi u:object_r:hal_lineage_powershare_default_exec:s0
# Sensors
/(vendor|system/vendor)/bin/hw/android\.hardware\.sensors@2.1-service\.xiaomi-multihal u:object_r:hal_sensors_default_exec:s0
/(vendor|system/vendor)/bin/hw/vendor.xiaomi.sensor.communicate@1.0-service u:object_r:vendor_hal_sensorcommunicate_default_exec:s0

View file

@ -1,3 +1,6 @@
# Battery
genfscon sysfs /class/qcom-battery u:object_r:vendor_sysfs_battery_supply:s0
# Extcon
genfscon sysfs /devices/platform/soc/88e0000.qcom,msm-eud/extcon u:object_r:sysfs_extcon:s0
genfscon sysfs /devices/platform/soc/soc:qcom,msm-ext-disp/extcon u:object_r:sysfs_extcon:s0

View file

@ -0,0 +1,2 @@
allow hal_lineage_powershare_default vendor_sysfs_battery_supply:dir search;
allow hal_lineage_powershare_default vendor_sysfs_battery_supply:file rw_file_perms;