init: update i2c bus numbers and move initialization to ueventd

Update the i2c bus numbers to use the statically assigned numbers
configured in the kernel device tree. In addition, use ueventd to set
the ACL for the i2c devices.

Bug: 291606723
Test: performance boot testing
Test: verify selinux labelling with ls -Z on the modified device nodes
Change-Id: Ib412510e4b6c086c978ad5487486323685732cae
This commit is contained in:
Will McVicker 2023-09-20 16:10:55 -07:00 committed by Treehugger Robot
parent 184fc05293
commit b1662cade2
5 changed files with 52 additions and 237 deletions

View file

@ -252,14 +252,6 @@ on init
chown system system /sys/class/power_supply/maxfg/m5_model_state
chown system system /sys/class/power_supply/maxfg_base/m5_model_state
# Dump eeprom
chown system system /sys/devices/platform/10970000.hsi2c/i2c-8/8-0050/eeprom
chown system system /sys/devices/platform/10970000.hsi2c/i2c-7/7-0050/eeprom
chown system system /sys/devices/platform/10970000.hsi2c/i2c-6/6-0050/eeprom
chown system system /sys/devices/platform/10970000.hsi2c/i2c-5/5-0050/eeprom
chown system system /sys/devices/platform/10970000.hsi2c/i2c-4/4-0050/eeprom
chown system system /dev/battery_history
# Modem temperature driver
chown radio system /sys/devices/platform/cp-tm1/cp_temp
@ -881,23 +873,6 @@ on post-fs-data
chown bluetooth system /proc/bluetooth/sleep/btwrite
mkdir /data/vendor/bluetooth 0770 bluetooth system
# ODPM
on fs
chown system system /sys/devices/platform/acpm_mfd_bus@17500000/i2c-0/i2c-s2mpg10mfd/s2mpg10-meter/s2mpg10-odpm/iio:device1/enabled_rails
chown system system /sys/devices/platform/acpm_mfd_bus@17500000/i2c-0/0-001f/s2mpg10-meter/s2mpg10-odpm/iio:device1/enabled_rails
chown system system /sys/devices/platform/acpm_mfd_bus@17510000/i2c-1/i2c-s2mpg11mfd/s2mpg11-meter/s2mpg11-odpm/iio:device0/enabled_rails
chown system system /sys/devices/platform/acpm_mfd_bus@17510000/i2c-1/1-002f/s2mpg11-meter/s2mpg11-odpm/iio:device0/enabled_rails
chown system system /sys/devices/platform/acpm_mfd_bus@17500000/i2c-6/i2c-s2mpg10mfd/s2mpg10-meter/s2mpg10-odpm/iio:device0/enabled_rails
chown system system /sys/devices/platform/acpm_mfd_bus@17500000/i2c-6/6-001f/s2mpg10-meter/s2mpg10-odpm/iio:device0/enabled_rails
chown system system /sys/devices/platform/acpm_mfd_bus@17510000/i2c-7/i2c-s2mpg11mfd/s2mpg11-meter/s2mpg11-odpm/iio:device1/enabled_rails
chown system system /sys/devices/platform/acpm_mfd_bus@17510000/i2c-7/7-002f/s2mpg11-meter/s2mpg11-odpm/iio:device1/enabled_rails
chown system system /sys/devices/platform/acpm_mfd_bus@17500000/i2c-7/i2c-s2mpg10mfd/s2mpg10-meter/s2mpg10-odpm/iio:device0/enabled_rails
chown system system /sys/devices/platform/acpm_mfd_bus@17500000/i2c-7/7-001f/s2mpg10-meter/s2mpg10-odpm/iio:device0/enabled_rails
chown system system /sys/devices/platform/acpm_mfd_bus@17510000/i2c-8/i2c-s2mpg11mfd/s2mpg11-meter/s2mpg11-odpm/iio:device1/enabled_rails
chown system system /sys/devices/platform/acpm_mfd_bus@17510000/i2c-8/8-002f/s2mpg11-meter/s2mpg11-odpm/iio:device1/enabled_rails
on post-fs-data
mkdir /data/vendor/powerstats 0771 system system
chown system system /data/vendor/powerstats

View file

@ -220,3 +220,32 @@
/sys/devices/platform/11110000.usb/11110000.dwc3/xhci-hcd-exynos.4.auto/usb2/2-1/*/*/leds/* brightness 0664 system system
/sys/devices/platform/11110000.usb/11110000.dwc3/xhci-hcd-exynos.4.auto/usb2/2-1/*/*/leds/* multi_intensity 0664 system system
# Dump Battery EEPROM history for pixelstats
/sys/devices/platform/10970000.hsi2c/i2c-7/7-0050 eeprom 0644 system system
/dev/battery_history 0644 system system
# ODPM
/sys/bus/iio/devices/iio:device* enabled_rails 0660 system system
# USB
/sys/class/typec/port0 power_role 664 root system
/sys/class/typec/port0 data_role 664 root system
/sys/class/typec/port0 port_type 664 root system
/sys/devices/platform/10d50000.hsi2c/i2c-8/i2c-max77759tcpc contaminant_detection 664 root system
/sys/devices/platform/10d50000.hsi2c/i2c-8/i2c-max77759tcpc usb_limit_accessory_current 664 root system
/sys/devices/platform/10d50000.hsi2c/i2c-8/i2c-max77759tcpc usb_limit_accessory_enable 664 root system
/sys/devices/platform/10d50000.hsi2c/i2c-8/i2c-max77759tcpc usb_limit_sink_current 664 root system
/sys/devices/platform/10d50000.hsi2c/i2c-8/i2c-max77759tcpc usb_limit_sink_enable 664 root system
/sys/devices/platform/10d50000.hsi2c/i2c-8/i2c-max77759tcpc usb_limit_source_enable 664 root system
/sys/devices/platform/10d50000.hsi2c/i2c-8/i2c-max77759tcpc update_sdp_enum_timeout 664 root system
/sys/devices/platform/10d50000.hsi2c/i2c-8/8-0025 contaminant_detection 664 root system
/sys/devices/platform/10d50000.hsi2c/i2c-8/8-0025 usb_limit_accessory_current 664 root system
/sys/devices/platform/10d50000.hsi2c/i2c-8/8-0025 usb_limit_accessory_enable 664 root system
/sys/devices/platform/10d50000.hsi2c/i2c-8/8-0025 usb_limit_sink_current 664 root system
/sys/devices/platform/10d50000.hsi2c/i2c-8/8-0025 usb_limit_sink_enable 664 root system
/sys/devices/platform/10d50000.hsi2c/i2c-8/8-0025 usb_limit_source_enable 664 root system
/sys/devices/platform/10d50000.hsi2c/i2c-8/8-0025 update_sdp_enum_timeout 664 root system
/sys/devices/platform/11110000.usb dwc3_exynos_otg_b_sess 664 root system
/sys/devices/platform/11110000.usb dwc3_exynos_otg_id 664 root system
/sys/devices/platform/11110000.usb usb_data_enabled 664 root system
/sys/devices/platform/google,pogo move_data_to_usb 664 root system