Merge "Update Usb hal permissions to allow pushing overheat suez events" into sc-dev

This commit is contained in:
Badhri Jagan Sridharan 2021-07-22 20:31:13 +00:00 committed by Android (Google) Code Review
commit 49804d8d6f
3 changed files with 22 additions and 0 deletions

View file

@ -189,6 +189,9 @@ type sysfs_pixelstats, fs_type, sysfs_type;
# WLC FW
type vendor_wlc_fwupdata_file, vendor_file_type, file_type;
#USB-C throttling stats
type sysfs_usbc_throttling_stats, sysfs_type, fs_type;
# SJTAG
type sysfs_sjtag, fs_type, sysfs_type;
userdebug_or_eng(`

View file

@ -296,3 +296,8 @@ genfscon sysfs /devices/platform/sjtag_gsa/interface u:object_
# Camera
genfscon sysfs /devices/platform/17000030.devfreq_intcam/devfreq/17000030.devfreq_intcam/min_freq u:object_r:sysfs_camera:s0
genfscon sysfs /devices/platform/17000060.devfreq_tnr/devfreq/17000060.devfreq_tnr/min_freq u:object_r:sysfs_camera:s0
# USB-C throttling stats
genfscon sysfs /devices/platform/google,usbc_port_cooling_dev/cleared_time u:object_r:sysfs_usbc_throttling_stats:s0
genfscon sysfs /devices/platform/google,usbc_port_cooling_dev/hysteresis_time u:object_r:sysfs_usbc_throttling_stats:s0
genfscon sysfs /devices/platform/google,usbc_port_cooling_dev/trip_time u:object_r:sysfs_usbc_throttling_stats:s0

View file

@ -12,3 +12,17 @@ set_prop(hal_usb_impl, vendor_usb_config_prop)
allow hal_usb_impl sysfs_batteryinfo:dir r_dir_perms;
allow hal_usb_impl sysfs_batteryinfo:file rw_file_perms;
allow hal_usb_impl sysfs_extcon:dir search;
# Needed for reporting Usb Overheat suez event through statsd
allow hal_usb_impl fwk_stats_service:service_manager find;
binder_call(hal_usb_impl, servicemanager)
# Needed for monitoring usb port temperature
allow hal_usb_impl self:capability2 wake_alarm;
wakelock_use(hal_usb_impl);
# For interfacing with ThermalHAL
hal_client_domain(hal_usb_impl, hal_thermal);
# For reading the usb-c throttling stats
allow hal_usb_impl sysfs_usbc_throttling_stats:file r_file_perms;