sm6150-common: sepolicy: Allow parts to set haptic intensity

Change-Id: I94774ccf021eb7713b41fc9d5ad6bb6979ca5d95
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: therealmharc <therealmharc@gmail.com>
This commit is contained in:
Pranav Vashi
2024-06-01 03:31:36 +05:30
committed by therealmharc
parent 29b74efa2c
commit 716efc3989
4 changed files with 12 additions and 0 deletions

View File

@@ -46,6 +46,10 @@ on init
chown root system /sys/fs/cgroup/memory/bg/tasks
chmod 0660 /sys/fs/cgroup/memory/bg/tasks
# Allow system to adjust haptic level directly
chown system system /sys/devices/platform/soc/a8c000.i2c/i2c-2/2-005a/ulevel
chmod 0664 /sys/devices/platform/soc/a8c000.i2c/i2c-2/2-005a/ulevel
on early-boot
# set RLIMIT_MEMLOCK to 64MB
setrlimit 8 67108864 67108864

View File

@@ -50,6 +50,9 @@
/vendor/bin/hw/vendor\.lineage\.livedisplay@2\.1-service\.xiaomi_sm6150 u:object_r:hal_lineage_livedisplay_qti_exec:s0
/vendor/bin/hw/vendor\.xiaomi\.hardware\.motor@1\.0-service u:object_r:hal_motor_default_exec:s0
# Haptic
/sys/devices/platform/soc/a8c000.i2c/i2c-2/2-005a/ulevel u:object_r:sysfs_vibrator:s0
# IR
/dev/lirc[0-9]+ u:object_r:lirc_device:s0
/dev/spidev[0-9]\.1 u:object_r:lirc_device:s0

View File

@@ -25,6 +25,9 @@ genfscon sysfs /devices/platform/soc/soc:fingerprint_fpc/power_cfg
genfscon sysfs /devices/platform/soc/soc:fingerprint_fpc/request_vreg u:object_r:vendor_sysfs_fingerprint:s0
genfscon sysfs /devices/platform/soc/soc:fingerprint_fpc/wakeup_enable u:object_r:vendor_sysfs_fingerprint:s0
# Haptic
genfscon sysfs /devices/platform/soc/a8c000.i2c/i2c-2/2-005a/ulevel u:object_r:sysfs_vibrator:s0
# LED
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-05/c440000.qcom,spmi:qcom,pm6150l@5:qcom,leds@d000/leds/left u:object_r:vendor_sysfs_graphics:s0
genfscon sysfs /devices/platform/soc/c440000.qcom,spmi/spmi-0/spmi0-05/c440000.qcom,spmi:qcom,pm6150l@5:qcom,leds@d000/leds/right u:object_r:vendor_sysfs_graphics:s0

View File

@@ -11,3 +11,5 @@ allow system_app { cgroup vendor_sysfs_graphics }:file rw_file_perms;
allow system_app { motor_device vendor_sysfs_graphics hall_device }:chr_file rw_file_perms;
allow system_app sysfs_thermal:file rw_file_perms;
allow system_app sysfs_vibrator:file rw_file_perms;