[ALPS03861775] modify sysfs_batteryinfo

[Detail]
1. Remove the battery_node label.
2. Modify the path for sysfs_batteryinfo from
   /sys/devices/platform/battery/power_supply to
   /sys/devices/platform/battery to let fuelgauged
   use it.
3. Add the sysfs_vbus and sysfs_pump_express label.

MTK-Commit-Id: 8603797a37fbb115f08a7c46a4292acbb34e1d05

Change-Id: I5a02d30d79a3564ef429f6dfe93f8df48004640b
CR-Id: ALPS03861775
Feature: Charger
This commit is contained in:
Elvin Lin 2020-01-18 09:47:11 +08:00
parent ad28808c22
commit 3af6d2d836
5 changed files with 9 additions and 7 deletions

View File

@ -255,6 +255,7 @@ type consyslog_data_file, file_type, data_file_type;
type sysfs_comport_type, fs_type, sysfs_type;
type sysfs_uart_info, fs_type, sysfs_type;
# Date : WK1817
# Purpose : for fuelgauged access
type battery_node, fs_type, sysfs_type;
# Date : WK1820
# Purpose : for charger to access vbus info and pump_express
type sysfs_vbus, fs_type, sysfs_type;
type sysfs_pump_express, fs_type, sysfs_type;

View File

@ -481,7 +481,8 @@
/sys/devices/virtual/BOOT/BOOT/boot/boot_mode(/.*)? u:object_r:sysfs_boot:s0
/sys/bus/platform/drivers/meta_com_type_info/meta_com_type_info(/.*)? u:object_r:sysfs_comport_type:s0
/sys/bus/platform/drivers/meta_uart_port_info/meta_uart_port_info(/.*)? u:object_r:sysfs_uart_info:s0
/sys/devices/platform/battery(/.*)? u:object_r:battery_node:s0
/sys/devices/platform/(charger|battery)/ADC_Charger_Voltage u:object_r:sysfs_vbus:s0
/sys/devices/platform/(charger|battery)/Pump_Express u:object_r:sysfs_pump_express:s0
#############################
# debugfs files

View File

@ -88,5 +88,5 @@ allow fuelgauged nvcfg_file:file { read write getattr open create };
# Date: W18.17
# Operation : add label for /sys/devices/platform/battery(/.*)
# Purpose : add fuelgauged could access
allow fuelgauged battery_node:file { read open };
r_dir_file(fuelgauged, sysfs_batteryinfo);

View File

@ -66,4 +66,4 @@ allow fuelgauged_nvram nvcfg_file:file { read write getattr open create };
# Date: W18.17
# Operation : add label for /sys/devices/platform/battery(/.*)
# Purpose : add fuelgauged could access
allow fuelgauged_nvram battery_node:file { read open };
r_dir_file(fuelgauged_nvram, sysfs_batteryinfo)

View File

@ -35,5 +35,5 @@ genfscon iso9660 / u:object_r:iso9660:s0
genfscon rawfs / u:object_r:rawfs:s0
genfscon fuseblk / u:object_r:fuseblk:s0
genfscon sysfs /devices/platform/battery/power_supply u:object_r:sysfs_batteryinfo:s0
genfscon sysfs /devices/platform/battery u:object_r:sysfs_batteryinfo:s0
genfscon sysfs /devices/platform/mt_charger/power_supply u:object_r:sysfs_batteryinfo:s0