From b9424d9c592ffb741779091a1d12a28e67bd4480 Mon Sep 17 00:00:00 2001 From: kierancyphus Date: Tue, 28 Nov 2023 14:27:24 +0800 Subject: [PATCH 01/41] logmasklibrary: update version info and freeze api The versions were originally not specified in the device manifest and compatibility matrices. This is changed here to fix the broken vts tests. Bug: 310109332 Test: atest vts_treble_vintf_vendor_test -- --abi arm64-v8a Change-Id: Ib2baeda6a3c81c701e6f813b6c88f561b158e674 --- device_framework_matrix_product.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml index 1e34caf2..e598cb86 100644 --- a/device_framework_matrix_product.xml +++ b/device_framework_matrix_product.xml @@ -144,6 +144,7 @@ com.google.pixel.modem.logmasklibrary + 1 ILiboemserviceProxy default From 7755cc6fdee877f8cabbb87b2dcf938626f9480d Mon Sep 17 00:00:00 2001 From: Jenny Ho Date: Mon, 18 Dec 2023 13:58:58 +0800 Subject: [PATCH 02/41] dump_power_gs201: lynx: add battery EEPROM dump path Bug: 316820830 Change-Id: Ia5833d8980f97335b15e9ebb3a81f28b9019adc9 Signed-off-by: Jenny Ho --- conf/init.gs201.rc | 1 + dumpstate/dump_power_gs201.sh | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/conf/init.gs201.rc b/conf/init.gs201.rc index 4c6da6df..f3cf22d9 100644 --- a/conf/init.gs201.rc +++ b/conf/init.gs201.rc @@ -243,6 +243,7 @@ on init chown system system /sys/devices/platform/10da0000.hsi2c/i2c-5/5-0050/eeprom chown system system /sys/devices/platform/10da0000.hsi2c/i2c-6/6-0050/eeprom chown system system /sys/devices/platform/10da0000.hsi2c/i2c-7/7-0050/eeprom + chown system system /sys/devices/platform/10da0000.hsi2c/i2c-8/8-0050/eeprom chown system system /sys/devices/platform/10da0000.hsi2c/i2c-9/9-0050/eeprom # Loading common kernel modules in background diff --git a/dumpstate/dump_power_gs201.sh b/dumpstate/dump_power_gs201.sh index 19c52e76..dd242e16 100644 --- a/dumpstate/dump_power_gs201.sh +++ b/dumpstate/dump_power_gs201.sh @@ -243,6 +243,11 @@ then xxd /sys/devices/platform/10da0000.hsi2c/i2c-7/7-0050/eeprom fi +if [ -e "/sys/devices/platform/10da0000.hsi2c/i2c-8/8-0050/eeprom" ] +then + xxd /sys/devices/platform/10da0000.hsi2c/i2c-8/8-0050/eeprom +fi + if [ -e "/sys/devices/platform/10da0000.hsi2c/i2c-9/9-0050/eeprom" ] then xxd /sys/devices/platform/10da0000.hsi2c/i2c-9/9-0050/eeprom From 2542b04a249a0b63008dd645579bfb266c7b0aea Mon Sep 17 00:00:00 2001 From: Jenny Ho Date: Mon, 18 Dec 2023 15:36:20 +0800 Subject: [PATCH 03/41] Adjust bd_state to system for read Bug: 316432531 Change-Id: I4964217a9c1782cc60011850ea111bd235b91ef6 Signed-off-by: Jenny Ho --- conf/init.gs201.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/init.gs201.rc b/conf/init.gs201.rc index f3cf22d9..baf014cd 100644 --- a/conf/init.gs201.rc +++ b/conf/init.gs201.rc @@ -311,6 +311,7 @@ on init chown system system /sys/devices/platform/google,charger/bd_trigger_time chown system system /sys/devices/platform/google,charger/bd_trigger_voltage chown system system /sys/devices/platform/google,charger/bd_clear + chown system system /sys/devices/platform/google,charger/bd_state chown system system /sys/devices/platform/google,charger/charge_start_level chown system system /sys/devices/platform/google,charger/charge_stop_level chown system system /sys/devices/platform/google,cpm/dc_ctl From a04e12983b9539f359e584b7b9f983d99162682a Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Wed, 20 Dec 2023 09:34:57 -0800 Subject: [PATCH 04/41] Migrate to gs-common/storage/init.storage.rc Bug: 311655524 Change-Id: I084717957a3bdf0bcbdca06502867d8e108ac139 Signed-off-by: Jaegeuk Kim --- conf/init.gs201.rc | 53 ---------------------------------------------- 1 file changed, 53 deletions(-) diff --git a/conf/init.gs201.rc b/conf/init.gs201.rc index baf014cd..1ea9bbc3 100644 --- a/conf/init.gs201.rc +++ b/conf/init.gs201.rc @@ -20,12 +20,8 @@ on init write /proc/vendor_sched/teo_util_threshold "1024 1024 1024" # Boot time fs tuning - write /sys/block/sda/queue/iostats 0 write /sys/block/sda/queue/scheduler bfq write /sys/block/sda/queue/iosched/slice_idle 0 - write /sys/block/sda/queue/nr_requests 256 - write /dev/sys/fs/by-name/userdata/data_io_flag 56 - write /dev/sys/fs/by-name/userdata/node_io_flag 56 chown system system /proc/vendor_sched/groups/bg/set_task_group chown system system /proc/vendor_sched/groups/cam/set_task_group @@ -105,15 +101,6 @@ on init chmod 0220 /proc/vendor_sched/pmu_poll_enable chmod 0220 /proc/vendor_sched/pmu_poll_time - wait /dev/block/platform/${ro.boot.boot_devices} - symlink /dev/block/platform/${ro.boot.boot_devices} /dev/block/bootdevice - - # to access UFS/eMMC sysfs directly - symlink /sys/devices/platform/${ro.boot.boot_devices} /dev/sys/block/bootdevice - - # Disable UFS powersaving - write /dev/sys/block/bootdevice/clkgate_enable 0 - start vendor.keymaster-4-0 # ZRAM setup @@ -463,15 +450,6 @@ on early-boot # Wait for insmod_sh to finish all common modules wait_for_prop vendor.common.modules.ready 1 - # Permission for Health Storage HAL - chown system system /dev/sys/block/bootdevice/manual_gc - - # Permission for Pixelstats - chown system system /dev/sys/block/bootdevice/slowio_read_cnt - chown system system /dev/sys/block/bootdevice/slowio_write_cnt - chown system system /dev/sys/block/bootdevice/slowio_unmap_cnt - chown system system /dev/sys/block/bootdevice/slowio_sync_cnt - # PCIe link stats for pixelstats chown system system /sys/devices/platform/11920000.pcie/link_stats/complete_timeout_irqs chown system system /sys/devices/platform/11920000.pcie/link_stats/link_down_irqs @@ -689,21 +667,6 @@ on property:init.svc.vendor.charger=running write /sys/devices/system/cpu/cpu7/online 0 on property:sys.boot_completed=1 - - # Runtime fs tuning - write /sys/block/sda/queue/nr_requests 128 - write /sys/block/sda/queue/iostats 1 - write /sys/block/sda/queue/iosched/slice_idle 0 - write /dev/sys/fs/by-name/userdata/data_io_flag 8 - write /dev/sys/fs/by-name/userdata/node_io_flag 8 - - # Permission for Pixelstats - chown system system /dev/sys/fs/by-name/userdata/compr_written_block - chown system system /dev/sys/fs/by-name/userdata/compr_saved_block - chown system system /dev/sys/fs/by-name/userdata/compr_new_inode - chown system system /dev/sys/fs/by-name/userdata/gc_segment_mode - chown system system /dev/sys/fs/by-name/userdata/gc_reclaimed_segments - # Enable ZRAM on boot_complete swapon_all /vendor/etc/fstab.${ro.board.platform} write /proc/sys/vm/swappiness 60 @@ -715,9 +678,6 @@ on property:sys.boot_completed=1 write /proc/sys/vm/dirty_expire_centisecs 3000 write /proc/sys/vm/dirty_background_ratio 10 - # Enable UFS powersaving - write /dev/sys/block/bootdevice/clkgate_enable 1 - # Reset DDR frequency write /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/exynos_data/cancel_boot_freq 1 write /sys/devices/platform/17000020.devfreq_int/devfreq/17000020.devfreq_int/exynos_data/cancel_boot_freq 1 @@ -1027,16 +987,6 @@ on charger mkdir /dev/thermal/cdev-by-name 0750 system system start vendor.thermal.symlinks - # Runtime fs tuning - write /sys/block/sda/queue/nr_requests 128 - write /sys/block/sda/queue/iostats 1 - write /sys/block/sda/queue/iosched/slice_idle 0 - write /dev/sys/fs/by-name/userdata/data_io_flag 8 - write /dev/sys/fs/by-name/userdata/node_io_flag 8 - - # Enable UFS powersaving - write /dev/sys/block/bootdevice/clkgate_enable 1 - # Cancel boot devfreq and uclamp write /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/exynos_data/cancel_boot_freq 1 write /sys/devices/platform/17000020.devfreq_int/devfreq/17000020.devfreq_int/exynos_data/cancel_boot_freq 1 @@ -1077,10 +1027,7 @@ on property:persist.vendor.softmaxfreq.cl1=* on property:persist.vendor.softmaxfreq.cl2=* write /sys/devices/platform/exynos-acme/freq_qos_max "6 ${persist.vendor.softmaxfreq.cl2}" -# UFS on property:ro.boot.mode=charger && property:init.svc.vendor.charger=running - # Enable UFS powersaving in Off Mode Charger - write /dev/sys/block/bootdevice/clkgate_enable 1 # Disable dock-defend in Off Mode Charger write /sys/devices/platform/google,charger/dd_state -1 From 42020dc4585442bd7ca88f183ba29a18834af197 Mon Sep 17 00:00:00 2001 From: Roy Luo Date: Wed, 20 Dec 2023 21:34:37 +0000 Subject: [PATCH 05/41] usb: implement heuristics to flag data compliance warnings Support flagging enum failure and flaky connection in device mode, flagging enum failure and missing data lines in host mode. No warning would be flagged until 5 secs after the data session starts to give ample time for the connection to stabilize, a timer is added to support it. Bug: 296119135 Test: manually trigger the warnings Change-Id: I25f08657e328913946add192b5ecb9ee50c3a1a8 --- usb/usb/UsbDataSessionMonitor.cpp | 125 ++++++++++++++++++++++++++---- usb/usb/UsbDataSessionMonitor.h | 3 + 2 files changed, 113 insertions(+), 15 deletions(-) diff --git a/usb/usb/UsbDataSessionMonitor.cpp b/usb/usb/UsbDataSessionMonitor.cpp index 77defb30..a2ccbafb 100644 --- a/usb/usb/UsbDataSessionMonitor.cpp +++ b/usb/usb/UsbDataSessionMonitor.cpp @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -48,6 +49,14 @@ namespace usb { #define UEVENT_MSG_LEN 2048 #define USB_STATE_MAX_LEN 20 #define DATA_ROLE_MAX_LEN 10 +#define WARNING_SURFACE_DELAY_SEC 5 +#define ENUM_FAIL_DEFAULT_COUNT_THRESHOLD 3 +#define DEVICE_FLAKY_CONNECTION_CONFIGURED_COUNT_THRESHOLD 5 +/* + * Typically a smooth and successful enumeration in device mode would go through 5 states at + * maximum: not attached -> default -> default -> addressed -> configured + */ +#define DEVICE_STATE_TRANSITION_PER_ENUMERATION 5 constexpr char kUdcConfigfsPath[] = "/config/usb_gadget/g1/UDC"; constexpr char kNotAttachedState[] = "not attached\n"; @@ -115,6 +124,15 @@ UsbDataSessionMonitor::UsbDataSessionMonitor( if (addEpollFd(epollFd, ueventFd)) abort(); + unique_fd timerFd(timerfd_create(CLOCK_BOOTTIME, TFD_NONBLOCK)); + if (timerFd.get() == -1) { + ALOGE("create timerFd failed"); + abort(); + } + + if (addEpollFd(epollFd, timerFd)) + abort(); + if (addEpollFile(epollFd.get(), dataRolePath, mDataRoleFd) != 0) { ALOGE("monitor data role failed"); abort(); @@ -139,6 +157,7 @@ UsbDataSessionMonitor::UsbDataSessionMonitor( mEpollFd = std::move(epollFd); mUeventFd = std::move(ueventFd); + mTimerFd = std::move(timerFd); mUpdatePortStatusCb = updatePortStatusCb; if (ReadFileToString(kUdcConfigfsPath, &udc) && !udc.empty()) @@ -223,13 +242,60 @@ void UsbDataSessionMonitor::notifyComplianceWarning() { void UsbDataSessionMonitor::evaluateComplianceWarning() { std::set newWarningSet; + int elapsedTimeSec; - // TODO: add heuristics and update newWarningSet - if (mDataRole == PortDataRole::DEVICE && mUdcBind) { - } else if (mDataRole == PortDataRole::HOST) { + elapsedTimeSec = + std::chrono::duration_cast(boot_clock::now() - mDataSessionStart) + .count(); + + if (elapsedTimeSec >= WARNING_SURFACE_DELAY_SEC) { + if (mDataRole == PortDataRole::DEVICE && mUdcBind) { + int stateCount = mDeviceState.states.size(); + int configuredCount = std::count(mDeviceState.states.begin(), + mDeviceState.states.end(), kConfiguredState); + int defaultCount = + std::count(mDeviceState.states.begin(), mDeviceState.states.end(), kDefaultState); + + if (configuredCount == 0 && defaultCount > ENUM_FAIL_DEFAULT_COUNT_THRESHOLD) + newWarningSet.insert(ComplianceWarning::ENUMERATION_FAIL); + + if (configuredCount > DEVICE_FLAKY_CONNECTION_CONFIGURED_COUNT_THRESHOLD && + stateCount > configuredCount * DEVICE_STATE_TRANSITION_PER_ENUMERATION) { + ALOGI("Detected flaky connection: state count %d, configured count %d", + stateCount, configuredCount); + newWarningSet.insert(ComplianceWarning::FLAKY_CONNECTION); + } + } else if (mDataRole == PortDataRole::HOST) { + int host1StateCount = mHost1State.states.size(); + int host1ConfiguredCount = + std::count(mHost1State.states.begin(), mHost1State.states.end(), kConfiguredState); + int host1DefaultCount = + std::count(mHost1State.states.begin(), mHost1State.states.end(), kDefaultState); + int host2StateCount = mHost2State.states.size(); + int host2ConfiguredCount = + std::count(mHost2State.states.begin(), mHost2State.states.end(), kConfiguredState); + int host2DefaultCount = + std::count(mHost2State.states.begin(), mHost2State.states.end(), kDefaultState); + + if (host1ConfiguredCount == 0 && host2ConfiguredCount == 0 && + (host1DefaultCount > ENUM_FAIL_DEFAULT_COUNT_THRESHOLD || + host2DefaultCount > ENUM_FAIL_DEFAULT_COUNT_THRESHOLD)) + newWarningSet.insert(ComplianceWarning::ENUMERATION_FAIL); + + if (host1StateCount == 1 && mHost1State.states.front() == kNotAttachedState && + host2StateCount == 1 && mHost2State.states.front() == kNotAttachedState) + newWarningSet.insert(ComplianceWarning::MISSING_DATA_LINES); + } } if (newWarningSet != mWarningSet) { + std::string newWarningString; + + for (auto e : newWarningSet) { + newWarningString += toString(e) + " "; + } + ALOGI("Usb data compliance warning changed to: %s", newWarningString.c_str()); + mWarningSet = newWarningSet; notifyComplianceWarning(); } @@ -259,6 +325,26 @@ void UsbDataSessionMonitor::handleDeviceStateEvent(struct usbDeviceState *device evaluateComplianceWarning(); } +void UsbDataSessionMonitor::setupNewSession() { + mWarningSet.clear(); + mDataSessionStart = boot_clock::now(); + + if (mDataRole == PortDataRole::DEVICE) { + clearDeviceStateEvents(&mDeviceState); + } else if (mDataRole == PortDataRole::HOST) { + clearDeviceStateEvents(&mHost1State); + clearDeviceStateEvents(&mHost2State); + } + + if (mDataRole != PortDataRole::NONE) { + struct itimerspec delay = itimerspec(); + delay.it_value.tv_sec = WARNING_SURFACE_DELAY_SEC; + int ret = timerfd_settime(mTimerFd.get(), 0, &delay, NULL); + if (ret < 0) + ALOGE("timerfd_settime failed err:%d", errno); + } +} + void UsbDataSessionMonitor::handleDataRoleEvent() { int n; PortDataRole newDataRole; @@ -283,17 +369,8 @@ void UsbDataSessionMonitor::handleDataRoleEvent() { reportUsbDataSessionMetrics(); } - // Set up for the new data session - mWarningSet.clear(); mDataRole = newDataRole; - mDataSessionStart = boot_clock::now(); - - if (newDataRole == PortDataRole::DEVICE) { - clearDeviceStateEvents(&mDeviceState); - } else if (newDataRole == PortDataRole::HOST) { - clearDeviceStateEvents(&mHost1State); - clearDeviceStateEvents(&mHost2State); - } + setupNewSession(); } } @@ -328,8 +405,7 @@ void UsbDataSessionMonitor::updateUdcBindStatus(const std::string &devname) { } else if (!mUdcBind && newUdcBind) { // Gadget soft pullup: reset and start accounting for a new data session. - clearDeviceStateEvents(&mDeviceState); - mDataSessionStart = boot_clock::now(); + setupNewSession(); } } @@ -383,6 +459,23 @@ void UsbDataSessionMonitor::handleUevent() { } } +void UsbDataSessionMonitor::handleTimerEvent() { + int byteRead; + uint64_t numExpiration; + + byteRead = read(mTimerFd.get(), &numExpiration, sizeof(numExpiration)); + + if (byteRead != sizeof(numExpiration)) { + ALOGE("incorrect read size"); + } + + if (numExpiration != 1) { + ALOGE("incorrect expiration count"); + } + + evaluateComplianceWarning(); +} + void *UsbDataSessionMonitor::monitorThread(void *param) { UsbDataSessionMonitor *monitor = (UsbDataSessionMonitor *)param; struct epoll_event events[64]; @@ -400,6 +493,8 @@ void *UsbDataSessionMonitor::monitorThread(void *param) { for (int n = 0; n < nevents; ++n) { if (events[n].data.fd == monitor->mUeventFd.get()) { monitor->handleUevent(); + } else if (events[n].data.fd == monitor->mTimerFd.get()) { + monitor->handleTimerEvent(); } else if (events[n].data.fd == monitor->mDataRoleFd.get()) { monitor->handleDataRoleEvent(); } else if (events[n].data.fd == monitor->mDeviceState.fd.get()) { diff --git a/usb/usb/UsbDataSessionMonitor.h b/usb/usb/UsbDataSessionMonitor.h index 596f378f..aced8a48 100644 --- a/usb/usb/UsbDataSessionMonitor.h +++ b/usb/usb/UsbDataSessionMonitor.h @@ -75,9 +75,11 @@ class UsbDataSessionMonitor { static void *monitorThread(void *param); void handleUevent(); + void handleTimerEvent(); void handleDataRoleEvent(); void handleDeviceStateEvent(struct usbDeviceState *deviceState); void clearDeviceStateEvents(struct usbDeviceState *deviceState); + void setupNewSession(); void reportUsbDataSessionMetrics(); void evaluateComplianceWarning(); void notifyComplianceWarning(); @@ -86,6 +88,7 @@ class UsbDataSessionMonitor { pthread_t mMonitor; unique_fd mEpollFd; unique_fd mUeventFd; + unique_fd mTimerFd; unique_fd mDataRoleFd; struct usbDeviceState mDeviceState; struct usbDeviceState mHost1State; From 5e14ba01be9acc31d3df0f506b4287eea0bf9583 Mon Sep 17 00:00:00 2001 From: Roy Luo Date: Tue, 26 Dec 2023 20:45:34 +0000 Subject: [PATCH 06/41] usb: adjust heuristics for flaky connection warning The state count requirement is very specific to the case where the signal integrity is the culprit of flaky connection. However, there could be other cases such as bad receptacles causing data pins to disconnect randomly. Remove the state count requirement to cover more cases. Bug: 296119135 Test: manually trigger the warnings Change-Id: Ic2ae376ad6062d9930614381503f44e4a5ac760f --- usb/usb/UsbDataSessionMonitor.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/usb/usb/UsbDataSessionMonitor.cpp b/usb/usb/UsbDataSessionMonitor.cpp index a2ccbafb..bae261d7 100644 --- a/usb/usb/UsbDataSessionMonitor.cpp +++ b/usb/usb/UsbDataSessionMonitor.cpp @@ -52,11 +52,6 @@ namespace usb { #define WARNING_SURFACE_DELAY_SEC 5 #define ENUM_FAIL_DEFAULT_COUNT_THRESHOLD 3 #define DEVICE_FLAKY_CONNECTION_CONFIGURED_COUNT_THRESHOLD 5 -/* - * Typically a smooth and successful enumeration in device mode would go through 5 states at - * maximum: not attached -> default -> default -> addressed -> configured - */ -#define DEVICE_STATE_TRANSITION_PER_ENUMERATION 5 constexpr char kUdcConfigfsPath[] = "/config/usb_gadget/g1/UDC"; constexpr char kNotAttachedState[] = "not attached\n"; @@ -250,7 +245,6 @@ void UsbDataSessionMonitor::evaluateComplianceWarning() { if (elapsedTimeSec >= WARNING_SURFACE_DELAY_SEC) { if (mDataRole == PortDataRole::DEVICE && mUdcBind) { - int stateCount = mDeviceState.states.size(); int configuredCount = std::count(mDeviceState.states.begin(), mDeviceState.states.end(), kConfiguredState); int defaultCount = @@ -259,12 +253,8 @@ void UsbDataSessionMonitor::evaluateComplianceWarning() { if (configuredCount == 0 && defaultCount > ENUM_FAIL_DEFAULT_COUNT_THRESHOLD) newWarningSet.insert(ComplianceWarning::ENUMERATION_FAIL); - if (configuredCount > DEVICE_FLAKY_CONNECTION_CONFIGURED_COUNT_THRESHOLD && - stateCount > configuredCount * DEVICE_STATE_TRANSITION_PER_ENUMERATION) { - ALOGI("Detected flaky connection: state count %d, configured count %d", - stateCount, configuredCount); + if (configuredCount > DEVICE_FLAKY_CONNECTION_CONFIGURED_COUNT_THRESHOLD) newWarningSet.insert(ComplianceWarning::FLAKY_CONNECTION); - } } else if (mDataRole == PortDataRole::HOST) { int host1StateCount = mHost1State.states.size(); int host1ConfiguredCount = From 4305bf7cd01b43679b9d98c38866fb7a6e3bf010 Mon Sep 17 00:00:00 2001 From: Limon Mia Date: Tue, 26 Dec 2023 10:10:21 +0000 Subject: [PATCH 07/41] Packed vendor log to bugreport for P22 Bug: 316071157 Test: enable vendor log and take bugreport Change-Id: If9497810763d813e97a893d736bfbdeaf208c904 --- conf/init.gs201.rc | 1 + device.mk | 3 +++ 2 files changed, 4 insertions(+) diff --git a/conf/init.gs201.rc b/conf/init.gs201.rc index 1ea9bbc3..0948e9b4 100644 --- a/conf/init.gs201.rc +++ b/conf/init.gs201.rc @@ -886,6 +886,7 @@ on post-fs-data chown bluetooth system /proc/bluetooth/sleep/btwake chown bluetooth system /proc/bluetooth/sleep/lpm chown bluetooth system /proc/bluetooth/sleep/btwrite + mkdir /data/vendor/bluetooth 0770 bluetooth system on post-fs-data mkdir /data/vendor/powerstats 0771 system system diff --git a/device.mk b/device.mk index d15c21d4..76c9a6d4 100644 --- a/device.mk +++ b/device.mk @@ -37,6 +37,9 @@ include device/google/gs-common/sota_app/factoryota.mk include device/google/gs-common/misc_writer/misc_writer.mk include device/google/gs-common/gyotaku_app/gyotaku.mk include device/google/gs-common/bootctrl/bootctrl_aidl.mk +ifneq ($(filter cheetah felix panther, $(TARGET_PRODUCT)),) + include device/google/gs-common/bcmbt/dump/dumplog.mk +endif TARGET_BOARD_PLATFORM := gs201 From 59ed5b77f567ab4b77c3724d5f2bbd2179802fb2 Mon Sep 17 00:00:00 2001 From: wenchangliu Date: Thu, 14 Dec 2023 19:07:48 +0000 Subject: [PATCH 08/41] gs201: uses Codec2 HIDL 1.2 service - Include mediacodec_samsung setting from gs-common - Enable Codec2 HIDL 1.2 from BoardConfig and update manifest hidl version for samsung.hardware.media.c2 Bug: 318793681 Test: run cts -m CtsMediaDecoderTestCases Test: run cts -m CtsMediaPlayerTestCases Test: run vts -m vts_treble_vintf_vendor_test Change-Id: I1f947d2eb75bd4d75d9db1d39b0b083d32f8032f --- BoardConfig-common.mk | 1 + device.mk | 24 ++++-------------------- manifest_media.xml | 10 +++++++++- manifest_media_aosp.xml | 2 +- 4 files changed, 15 insertions(+), 22 deletions(-) diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk index e1d6cd4f..60cbdd75 100644 --- a/BoardConfig-common.mk +++ b/BoardConfig-common.mk @@ -190,6 +190,7 @@ BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4 # Video Codec ######################## # 1. Exynos C2 +BOARD_USE_CODEC2_HIDL_1_2 := true BOARD_USE_CSC_FILTER := false BOARD_USE_DEC_SW_CSC := true BOARD_USE_ENC_SW_CSC := true diff --git a/device.mk b/device.mk index 76c9a6d4..4f55d78a 100644 --- a/device.mk +++ b/device.mk @@ -752,30 +752,14 @@ endif $(call soong_config_set,bigo,soc,gs201) # 1. Codec 2.0 -# exynos service -PRODUCT_SOONG_NAMESPACES += vendor/samsung_slsi/codec2 +# for settings used by different C2 hal +include device/google/gs-common/mediacodec/common/mediacodec_common.mk +# for Exynos C2 Hal +include device/google/gs-common/mediacodec/samsung/mediacodec_samsung.mk PRODUCT_COPY_FILES += \ device/google/gs201/media_codecs_performance_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_performance_c2.xml \ -PRODUCT_PACKAGES += \ - samsung.hardware.media.c2@1.0-service \ - codec2.vendor.base.policy \ - codec2.vendor.ext.policy \ - libExynosC2ComponentStore \ - libExynosC2H264Dec \ - libExynosC2H264Enc \ - libExynosC2HevcDec \ - libExynosC2HevcEnc \ - libExynosC2Mpeg4Dec \ - libExynosC2Mpeg4Enc \ - libExynosC2H263Dec \ - libExynosC2H263Enc \ - libExynosC2Vp8Dec \ - libExynosC2Vp8Enc \ - libExynosC2Vp9Dec \ - libExynosC2Vp9Enc - PRODUCT_PROPERTY_OVERRIDES += \ debug.stagefright.c2-poolmask=458752 \ debug.c2.use_dmabufheaps=1 \ diff --git a/manifest_media.xml b/manifest_media.xml index 3ed9e247..38e56ba2 100644 --- a/manifest_media.xml +++ b/manifest_media.xml @@ -5,8 +5,16 @@ 1.0 IComponentStore - default default1 + + android.hardware.media.c2 + hwbinder + 1.2 + + IComponentStore + default + + diff --git a/manifest_media_aosp.xml b/manifest_media_aosp.xml index 3bc347c9..9a1a3dba 100644 --- a/manifest_media_aosp.xml +++ b/manifest_media_aosp.xml @@ -2,7 +2,7 @@ android.hardware.media.c2 hwbinder - 1.0 + 1.2 IComponentStore default From fc280685ca4dcbf61ae1f610ddabadd6d54f989e Mon Sep 17 00:00:00 2001 From: Roy Luo Date: Thu, 4 Jan 2024 01:15:16 +0000 Subject: [PATCH 09/41] usb: dump flag value in the constructor Dump flag value in the construtor for easier debugging. Feature flags are not expected to change in runtime, dumping the value once should be enough. Bug: 296119135 Test: manual test Change-Id: Ie5aca2dff23e59704fb306833cde0e592b9f430d (cherry picked from commit 9164eae7cdee032381d8bf045fbbed33f62b00bf) --- usb/usb/Usb.cpp | 5 +++++ usb/usb/UsbDataSessionMonitor.cpp | 3 +++ 2 files changed, 8 insertions(+) diff --git a/usb/usb/Usb.cpp b/usb/usb/Usb.cpp index 555e6576..8725bc83 100644 --- a/usb/usb/Usb.cpp +++ b/usb/usb/Usb.cpp @@ -584,6 +584,11 @@ Usb::Usb() ALOGE("pthread creation failed %d\n", errno); abort(); } + + ALOGI("feature flag enable_usb_data_compliance_warning: %d", + usb_flags::enable_usb_data_compliance_warning()); + ALOGI("feature flag enable_input_power_limited_warning: %d", + usb_flags::enable_input_power_limited_warning()); } ScopedAStatus Usb::switchRole(const string& in_portName, const PortRole& in_role, diff --git a/usb/usb/UsbDataSessionMonitor.cpp b/usb/usb/UsbDataSessionMonitor.cpp index bae261d7..bff52f06 100644 --- a/usb/usb/UsbDataSessionMonitor.cpp +++ b/usb/usb/UsbDataSessionMonitor.cpp @@ -164,6 +164,9 @@ UsbDataSessionMonitor::UsbDataSessionMonitor( ALOGE("pthread creation failed %d", errno); abort(); } + + ALOGI("feature flag enable_report_usb_data_compliance_warning: %d", + usb_flags::enable_report_usb_data_compliance_warning()); } UsbDataSessionMonitor::~UsbDataSessionMonitor() {} From 58dc83553902623bf159c4b8d0b6daee1c5d628a Mon Sep 17 00:00:00 2001 From: Devika Krishnadas Date: Tue, 9 Jan 2024 23:23:10 +0000 Subject: [PATCH 10/41] Revert^3 "Use graphics allocator 2" 4217a458ba8584d5b8ed03d3acc3ba261f90c67b Reverting to comply with the Allocator VTS for 24Q1, do not merge to main. Bug: 310046460 Test: VtsHalGraphicsAllocatorAidl_TargetTest Change-Id: I322cdf9452a80e5da87f1808b324ac2e499fe9cd --- device.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/device.mk b/device.mk index 4f55d78a..55e634e4 100644 --- a/device.mk +++ b/device.mk @@ -520,7 +520,7 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ android.hardware.graphics.mapper@4.0-impl \ - android.hardware.graphics.allocator-V2-service + android.hardware.graphics.allocator-V1-service PRODUCT_PACKAGES += \ android.hardware.memtrack-service.pixel \ From 9366c5117af8c3bbafb27b498b2874767bb2277b Mon Sep 17 00:00:00 2001 From: Mahesh Kallelil Date: Thu, 11 Jan 2024 09:46:47 -0800 Subject: [PATCH 11/41] Set owner as system for logbuffer_cpif Setting the owner of /dev/logbuffer_cpif as system to allow the dump_modem script to read the logs as part of bugreport Test: Tested bugreport on device Bug: 305600375 Change-Id: Ic7c64f942985596d9a5d919dfd3ca2127de881d0 Signed-off-by: Mahesh Kallelil --- conf/init.gs201.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/init.gs201.rc b/conf/init.gs201.rc index 0948e9b4..644cb846 100644 --- a/conf/init.gs201.rc +++ b/conf/init.gs201.rc @@ -487,6 +487,7 @@ on early-boot chown system system /dev/logbuffer_cpm chown system system /dev/logbuffer_bd chown system system /dev/logbuffer_dual_batt + chown system system /dev/logbuffer_cpif on boot From 6afe88fbce97d29e7afee357bc18bf50cb773984 Mon Sep 17 00:00:00 2001 From: Utku Utkan Date: Fri, 12 Jan 2024 00:24:24 +0000 Subject: [PATCH 12/41] Pregrant ACCESS_FINE_LOCATION as default permission to PCS on G2 Bug: 309676824 Test: m && flashall + pair & connect to remote device Wi-Fi AP Change-Id: Ic40efe2d77b6d69ec97888fd421a5d0bda51860b --- default-permissions.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/default-permissions.xml b/default-permissions.xml index a00707ef..e9a65436 100644 --- a/default-permissions.xml +++ b/default-permissions.xml @@ -45,6 +45,8 @@ package="com.google.android.apps.camera.services"> + + From 6a34636f893eb1674d5d93be7c8712dd869b8e33 Mon Sep 17 00:00:00 2001 From: Midas Chien Date: Wed, 17 Jan 2024 07:53:09 +0000 Subject: [PATCH 13/41] display: allow hwcomposer to access allow_wakeup_by_state_change Bug: 311495944 Test: check permission Change-Id: Id41872449035e16e7abc7f5111cdf95a7914f846 --- conf/init.gs201.rc | 1 + 1 file changed, 1 insertion(+) diff --git a/conf/init.gs201.rc b/conf/init.gs201.rc index 644cb846..354b791c 100644 --- a/conf/init.gs201.rc +++ b/conf/init.gs201.rc @@ -571,6 +571,7 @@ on fs chown system system /sys/class/backlight/panel0-backlight/dimming_on chown system system /sys/class/backlight/panel0-backlight/hbm_mode chown system system /sys/class/backlight/panel0-backlight/local_hbm_mode + chown system system /sys/class/backlight/panel0-backlight/allow_wakeup_by_state_change chown system system /sys/devices/platform/exynos-drm/primary-panel/gamma chown system system /sys/devices/platform/exynos-drm/primary-panel/min_vrefresh chown system system /sys/devices/platform/exynos-drm/primary-panel/idle_delay_ms From 84e6e2b49187a9e9254260216db050b6dfcb3d74 Mon Sep 17 00:00:00 2001 From: Kyle Tso Date: Wed, 17 Jan 2024 15:07:44 +0800 Subject: [PATCH 14/41] dumpstate: Fix wrong path for tcpm psy uevent Bug: 320605646 Change-Id: I24ee174bdb5f9bb8127f5ae158c55a8738d852e3 Signed-off-by: Kyle Tso --- dumpstate/dump_power_gs201.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dumpstate/dump_power_gs201.sh b/dumpstate/dump_power_gs201.sh index dd242e16..732e54c8 100644 --- a/dumpstate/dump_power_gs201.sh +++ b/dumpstate/dump_power_gs201.sh @@ -37,7 +37,7 @@ else fi echo "\n------ Power supply property tcpm ------" -cat "/sys/class/power_supply/tcpm-source-psy-8-0025/uevent" +cat /sys/class/power_supply/tcpm-source-psy-*/uevent echo "\n------ Power supply property usb ------" cat "/sys/class/power_supply/usb/uevent" echo "\n------ Power supply property wireless ------" From c1a79afe2d46bed026f95f52ae57a8d96f90e454 Mon Sep 17 00:00:00 2001 From: Wayne Lin Date: Thu, 18 Jan 2024 15:14:59 +0800 Subject: [PATCH 15/41] gps: add new certificate Bug: 319329399 Bug: 319329247 Test: confirm certificate is included Change-Id: Iafdbb7ad53da68c7f14fa94c1458f56016f70680 --- location/gps.cer | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/location/gps.cer b/location/gps.cer index 934e0c5c..eab842b3 100644 --- a/location/gps.cer +++ b/location/gps.cer @@ -159,3 +159,17 @@ Op9P1ZW2kjqv5D2+q/qtaePAyHn3B05UZrQYUmx7LaHNO7op6dZgCdoR0sVsR+Fc Zyr0AhgiuTWrjtUEOGx2qJVwAsHkpqtlN+DaGT08dT64LvIf0bfGvmtm++/WEDWJ HInwg85pGm+sEkYbYFRBD0woPBsL3g== -----END CERTIFICATE----- +-----BEGIN CERTIFICATE----- +MIICGTCCAZ+gAwIBAgIQCeCTZaz32ci5PhwLBCou8zAKBggqhkjOPQQDAzBOMQsw +CQYDVQQGEwJVUzEXMBUGA1UEChMORGlnaUNlcnQsIEluYy4xJjAkBgNVBAMTHURp +Z2lDZXJ0IFRMUyBFQ0MgUDM4NCBSb290IEc1MB4XDTIxMDExNTAwMDAwMFoXDTQ2 +MDExNDIzNTk1OVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDkRpZ2lDZXJ0LCBJ +bmMuMSYwJAYDVQQDEx1EaWdpQ2VydCBUTFMgRUNDIFAzODQgUm9vdCBHNTB2MBAG +ByqGSM49AgEGBSuBBAAiA2IABMFEoc8Rl1Ca3iOCNQfN0MsYndLxf3c1TzvdlHJS +7cI7+Oz6e2tYIOyZrsn8aLN1udsJ7MgT9U7GCh1mMEy7H0cKPGEQQil8pQgO4CLp +0zVozptjn4S1mU1YoI71VOeVyaNCMEAwHQYDVR0OBBYEFMFRRVBZqz7nLFr6ICIS +B4CIfBFqMA4GA1UdDwEB/wQEAwIBhjAPBgNVHRMBAf8EBTADAQH/MAoGCCqGSM49 +BAMDA2gAMGUCMQCJao1H5+z8blUD2WdsJk6Dxv3J+ysTvLd6jLRl0mlpYxNjOyZQ +LgGheQaRnUi/wr4CMEfDFXuxoJGZSZOoPHzoRgaLLPIxAJSdYsiJvRmEFOml+wG4 +DXZDjC5Ty3zfDBeWUA== +-----END CERTIFICATE----- From df3f348d3bfda22fe38fab3dd777fb6aff1db885 Mon Sep 17 00:00:00 2001 From: Spade Lee Date: Mon, 22 Jan 2024 16:50:25 +0000 Subject: [PATCH 16/41] dumpstate: add SoC residency dump Bug: 319536756 Change-Id: If12b04cca0b5f426709d4f0a8e4c6937d7abc7e2 Signed-off-by: Spade Lee --- conf/init.gs201.rc | 1 + dumpstate/dump_power_gs201.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/conf/init.gs201.rc b/conf/init.gs201.rc index 354b791c..decb3676 100644 --- a/conf/init.gs201.rc +++ b/conf/init.gs201.rc @@ -276,6 +276,7 @@ on init # BatteryHealthData chown system system /sys/class/power_supply/battery/first_usage_date + chown system system /sys/devices/platform/google,battery/power_supply/battery/swelling_data # Battery Defender chown system system /sys/devices/platform/google,battery/power_supply/battery/bd_trickle_cnt diff --git a/dumpstate/dump_power_gs201.sh b/dumpstate/dump_power_gs201.sh index 732e54c8..6613115f 100644 --- a/dumpstate/dump_power_gs201.sh +++ b/dumpstate/dump_power_gs201.sh @@ -129,6 +129,8 @@ cat "/dev/logbuffer_pca9468" echo "\n------ Battery Health ------" cat "/sys/class/power_supply/battery/health_index_stats" +echo "\n------ Battery Health SoC Residency ------" +cat "/sys/class/power_supply/battery/swelling_data" echo "\n------ BMS ------" cat "/dev/logbuffer_ssoc" echo "\n------ TTF ------" From c67150d613db867b44362bb02db019ec05a760b7 Mon Sep 17 00:00:00 2001 From: Jerry Huang Date: Thu, 25 Jan 2024 11:03:11 +0000 Subject: [PATCH 17/41] gs201: update c2.android.av1-dav1d.decoder performance point c2.android.av1-dav1d.decoder performance has been improved with CL "C2SoftDav1dDec: Fix performance issues in frame parallel multi-threading" More detail in b/315828433 Bug: 315828433 Test: run cts -m CtsMediaDecoderTestCases -a arm64-v8a -t android.media.decoder.cts.VideoDecoderPerfTest --module-arg CtsMediaDecoderTestCases:instrumentation-arg:codec-prefix:=c2.android.av1-dav1d.decoder Change-Id: If4912322095ec112507c2e7f37e5bc1506d8c17a --- media_codecs_performance_c2.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/media_codecs_performance_c2.xml b/media_codecs_performance_c2.xml index 12dde41e..0f7c377a 100644 --- a/media_codecs_performance_c2.xml +++ b/media_codecs_performance_c2.xml @@ -174,10 +174,10 @@ - - - - + + + + From 975145cc52fbc0fd13bc231dc9f4162de84208cd Mon Sep 17 00:00:00 2001 From: Robin Peng Date: Tue, 7 Mar 2023 16:03:21 +0000 Subject: [PATCH 18/41] Assign system_dlkm.modules.load to BOARD_SYSTEM_KERNEL_MODULES_LOAD - BOARD_SYSTEM_KERNEL_MODULES_LOAD is for GKI modules - BOARD_VENDOR_KERNEL_RAMDISK_KERNEL_MODULES_LOAD should not contains GKI modules Bug: 267429528 Bug: 322457552 Change-Id: Ib5da01f861a34edec07e2a958f153c876e5cef10 Signed-off-by: Robin Peng --- BoardConfig-common.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk index 60cbdd75..8c52a207 100644 --- a/BoardConfig-common.mk +++ b/BoardConfig-common.mk @@ -412,6 +412,12 @@ else BOARD_VENDOR_KERNEL_MODULES := $(KERNEL_MODULES) endif +BOARD_SYSTEM_KERNEL_MODULES_LOAD := $(strip $(shell cat $(KERNEL_MODULE_DIR)/system_dlkm.modules.load)) +ifndef BOARD_SYSTEM_KERNEL_MODULES_LOAD +$(warning system_dlkm.modules.load not found or empty) +endif +BOARD_SYSTEM_KERNEL_MODULES := $(addprefix $(KERNEL_MODULE_DIR)/, $(notdir $(BOARD_SYSTEM_KERNEL_MODULES_LOAD))) + # Using BUILD_COPY_HEADERS BUILD_BROKEN_USES_BUILD_COPY_HEADERS := true From c6d819462ef9f2ab4ba10b670015a9b28e64b104 Mon Sep 17 00:00:00 2001 From: Robin Peng Date: Mon, 20 Mar 2023 03:35:11 +0000 Subject: [PATCH 19/41] Support system_dlkm modules.blocklist from kernel side assign system_dlkm.modules.blocklist to BOARD_SYSTEM_KERNEL_MODULES_BLOCKLIST_FILE located from kernel prebuilts folder Bug: 267429528 Bug: 322457552 Change-Id: I912f1a8e0df12e4614c74b870921ca0b47b8383e Signed-off-by: Robin Peng --- BoardConfig-common.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk index 8c52a207..4e34ea20 100644 --- a/BoardConfig-common.mk +++ b/BoardConfig-common.mk @@ -381,6 +381,9 @@ BOARD_BUILD_VENDOR_RAMDISK_IMAGE := true KERNEL_MODULE_DIR := $(TARGET_KERNEL_DIR) KERNEL_MODULES := $(wildcard $(KERNEL_MODULE_DIR)/*.ko) +ifneq ($(wildcard $(KERNEL_MODULE_DIR)/system_dlkm.modules.blocklist),) +BOARD_SYSTEM_KERNEL_MODULES_BLOCKLIST_FILE := $(KERNEL_MODULE_DIR)/system_dlkm.modules.blocklist +endif BOARD_VENDOR_KERNEL_MODULES_BLOCKLIST_FILE := $(KERNEL_MODULE_DIR)/vendor_dlkm.modules.blocklist # Prebuilt kernel modules that are *not* listed in vendor_kernel_boot.modules.load From 0eb7d38545553b45f301c1c07f8313f5a51db1eb Mon Sep 17 00:00:00 2001 From: kierancyphus Date: Wed, 24 Jan 2024 15:30:04 +0800 Subject: [PATCH 20/41] liboemservice_proxy: Remove service defs `Liboemservice_proxy` was originally included as a part of the build target for DMD, which meant that the binder aidl declaration had to be done on all devices that used DMD (all Lassen devices), even if they didn't use the service. `Liboemservice_proxy` has now been decoupled from DMD so it only needs to be included on our target devices now. This CL removes the outdated service definitions. Test: Build gs101 and ensure it still builds. Bug: 321867236 Change-Id: I7fb10e4013da59f42cff47da6d104deed9b4bb71 --- device_framework_matrix_product.xml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml index e598cb86..9d626258 100644 --- a/device_framework_matrix_product.xml +++ b/device_framework_matrix_product.xml @@ -142,14 +142,6 @@ sced0 - - com.google.pixel.modem.logmasklibrary - 1 - - ILiboemserviceProxy - default - - vendor.samsung_slsi.telephony.hardware.radioExternal 1.1 From ff196ef65a7a4033b9537af8d0611a4c4ba18f48 Mon Sep 17 00:00:00 2001 From: Darren Hsu Date: Fri, 26 Jan 2024 16:22:10 +0800 Subject: [PATCH 21/41] powerstats: expose display MRR state residency data provider Bug: 317767775 Test: vts-tradefed run vts -m VtsHalPowerStatsTargetTest Change-Id: I72037cc9d5b35a47ae0173d52bbc57708a593936 Signed-off-by: Darren Hsu --- powerstats/Gs201CommonDataProviders.cpp | 11 +++++++++++ powerstats/include/Gs201CommonDataProviders.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/powerstats/Gs201CommonDataProviders.cpp b/powerstats/Gs201CommonDataProviders.cpp index d6f1af58..2b1f5618 100644 --- a/powerstats/Gs201CommonDataProviders.cpp +++ b/powerstats/Gs201CommonDataProviders.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -37,6 +38,7 @@ using aidl::android::hardware::power::stats::AdaptiveDvfsStateResidencyDataProvider; using aidl::android::hardware::power::stats::AocTimedStateResidencyDataProvider; using aidl::android::hardware::power::stats::DevfreqStateResidencyDataProvider; +using aidl::android::hardware::power::stats::DisplayMrrStateResidencyDataProvider; using aidl::android::hardware::power::stats::DvfsStateResidencyDataProvider; using aidl::android::hardware::power::stats::UfsStateResidencyDataProvider; using aidl::android::hardware::power::stats::EnergyConsumerType; @@ -608,6 +610,15 @@ void addCamera(std::shared_ptr p) { {"VSYS_PWR_CAM"})); } +void addDisplayMrrByEntity(std::shared_ptr p, std::string name, std::string path) { + p->addStateResidencyDataProvider(std::make_unique( + name, path)); +} + +void addDisplayMrr(std::shared_ptr p) { + addDisplayMrrByEntity(p, "Display", "/sys/class/drm/card0/device/primary-panel/"); +} + void addGs201CommonDataProviders(std::shared_ptr p) { setEnergyMeter(p); diff --git a/powerstats/include/Gs201CommonDataProviders.h b/powerstats/include/Gs201CommonDataProviders.h index 97a70668..6cc81361 100644 --- a/powerstats/include/Gs201CommonDataProviders.h +++ b/powerstats/include/Gs201CommonDataProviders.h @@ -24,6 +24,8 @@ void addAoC(std::shared_ptr p); void addCPUclusters(std::shared_ptr p); void addCamera(std::shared_ptr p); void addDevfreq(std::shared_ptr p); +void addDisplayMrr(std::shared_ptr p); +void addDisplayMrrByEntity(std::shared_ptr p, std::string name, std::string path); void addDvfsStats(std::shared_ptr p); void addGNSS(std::shared_ptr p); void addGs201CommonDataProviders(std::shared_ptr p); From 55257cbde8b3e9f223911aa06a143873711cd64a Mon Sep 17 00:00:00 2001 From: Joe Onorato Date: Mon, 29 Jan 2024 18:49:40 -0800 Subject: [PATCH 22/41] remove build log spam Test: m Change-Id: I5bd60de66b31c7c5df43240161350d0f5d4da29f --- BoardConfig-common.mk | 3 --- 1 file changed, 3 deletions(-) diff --git a/BoardConfig-common.mk b/BoardConfig-common.mk index 4e34ea20..2eab1573 100644 --- a/BoardConfig-common.mk +++ b/BoardConfig-common.mk @@ -416,9 +416,6 @@ BOARD_VENDOR_KERNEL_MODULES := $(KERNEL_MODULES) endif BOARD_SYSTEM_KERNEL_MODULES_LOAD := $(strip $(shell cat $(KERNEL_MODULE_DIR)/system_dlkm.modules.load)) -ifndef BOARD_SYSTEM_KERNEL_MODULES_LOAD -$(warning system_dlkm.modules.load not found or empty) -endif BOARD_SYSTEM_KERNEL_MODULES := $(addprefix $(KERNEL_MODULE_DIR)/, $(notdir $(BOARD_SYSTEM_KERNEL_MODULES_LOAD))) # Using BUILD_COPY_HEADERS From 7d2aafad340108a395913b21d8de5667d9c93b09 Mon Sep 17 00:00:00 2001 From: Leon Scroggins III Date: Thu, 25 Jan 2024 15:13:31 -0500 Subject: [PATCH 23/41] gs201: Remove sysprop forcing renderengine to skiaglthreaded This is already the default, so no need to set via sysprop. Moving forward, we will set this using flags, unless a particular category of device needs to override the flag. Bug: 293371537 Test: NA Change-Id: Id05d31e3c058d3bfe961d90e37a0c6992d823605 --- device.mk | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/device.mk b/device.mk index 55e634e4..04284533 100644 --- a/device.mk +++ b/device.mk @@ -283,8 +283,7 @@ PRODUCT_VENDOR_PROPERTIES += \ PRODUCT_VENDOR_PROPERTIES += \ ro.opengles.version=196610 \ - graphics.gpu.profiler.support=true \ - debug.renderengine.backend=skiaglthreaded + graphics.gpu.profiler.support=true # b/295257834 Add HDR shaders to SurfaceFlinger's pre-warming cache PRODUCT_VENDOR_PROPERTIES += ro.surface_flinger.prime_shader_cache.ultrahdr=1 From 9bafd5f1342918d640260f5b4f90298680aa47a4 Mon Sep 17 00:00:00 2001 From: Kyle Tso Date: Tue, 16 Jan 2024 10:16:14 +0800 Subject: [PATCH 24/41] usb: Runtime search the i2c path The paths of sysfs nodes are different on multiple build targets and are also different between the old kernel (5.10) and newer kernel (6.1). Since usb HAL code is shared by those targets and different kernel versions, Runtime search the correct paths. Bug: 317946158 Change-Id: I676455145232fd71db1578bb7a9801fed7bb327f Signed-off-by: Kyle Tso --- usb/gadget/UsbGadget.cpp | 65 +++++++++++--------------- usb/gadget/UsbGadget.h | 1 + usb/usb/Usb.cpp | 98 +++++++++++++++++++++------------------- usb/usb/Usb.h | 1 + 4 files changed, 79 insertions(+), 86 deletions(-) diff --git a/usb/gadget/UsbGadget.cpp b/usb/gadget/UsbGadget.cpp index d3bd8f36..da1e8012 100644 --- a/usb/gadget/UsbGadget.cpp +++ b/usb/gadget/UsbGadget.cpp @@ -17,7 +17,6 @@ #define LOG_TAG "android.hardware.usb.gadget.aidl-service" #include "UsbGadget.h" -#include #include #include #include @@ -29,6 +28,7 @@ #include #include +#include namespace aidl { namespace android { @@ -37,39 +37,19 @@ namespace usb { namespace gadget { using ::android::base::GetBoolProperty; +using ::android::hardware::google::pixel::usb::getI2cClientPath; using ::android::hardware::google::pixel::usb::kUvcEnabled; string enabledPath; constexpr char kHsi2cPath[] = "/sys/devices/platform/10d60000.hsi2c"; -constexpr char kI2CPath[] = "/sys/devices/platform/10d60000.hsi2c/i2c-"; -constexpr char kAccessoryLimitCurrent[] = "i2c-max77759tcpc/usb_limit_accessory_current"; -constexpr char kAccessoryLimitCurrentEnable[] = "i2c-max77759tcpc/usb_limit_accessory_enable"; -constexpr char kUpdateSdpEnumTimeout[] = "i2c-max77759tcpc/update_sdp_enum_timeout"; +constexpr char kTcpcDevName[] = "i2c-max77759tcpc"; +constexpr char kI2cClientId[] = "0025"; +constexpr char kAccessoryLimitCurrent[] = "usb_limit_accessory_current"; +constexpr char kAccessoryLimitCurrentEnable[] = "usb_limit_accessory_enable"; +constexpr char kUpdateSdpEnumTimeout[] = "update_sdp_enum_timeout"; -Status getI2cBusHelper(string *name) { - DIR *dp; - - dp = opendir(kHsi2cPath); - if (dp != NULL) { - struct dirent *ep; - - while ((ep = readdir(dp))) { - if (ep->d_type == DT_DIR) { - if (string::npos != string(ep->d_name).find("i2c-")) { - std::strtok(ep->d_name, "-"); - *name = std::strtok(NULL, "-"); - } - } - } - closedir(dp); - return Status::SUCCESS; - } - - ALOGE("Failed to open %s", kHsi2cPath); - return Status::ERROR; -} - -UsbGadget::UsbGadget() : mGadgetIrqPath("") { +UsbGadget::UsbGadget() : mGadgetIrqPath(""), + mI2cClientPath("") { if (access(OS_DESC_PATH, R_OK) != 0) { ALOGE("configfs setup not done yet"); abort(); @@ -389,14 +369,16 @@ ScopedAStatus UsbGadget::reset(const shared_ptr &callback, } void UsbGadget::updateSdpEnumTimeout() { - string i2c_node, update_sdp_enum_timeout_path; + string update_sdp_enum_timeout_path; - Status status = getI2cBusHelper(&i2c_node); - if (status != Status::SUCCESS) { - ALOGE("%s: Unable to locate i2c bus node", __func__); + if (mI2cClientPath.empty()) { + mI2cClientPath = getI2cClientPath(kHsi2cPath, kTcpcDevName, kI2cClientId); + if (mI2cClientPath.empty()) { + ALOGE("%s: Unable to locate i2c bus node", __func__); + } } - update_sdp_enum_timeout_path = kI2CPath + i2c_node + "/" + kUpdateSdpEnumTimeout; + update_sdp_enum_timeout_path = mI2cClientPath + kUpdateSdpEnumTimeout; if (!WriteStringToFile("1", update_sdp_enum_timeout_path)) { ALOGE("%s: Unable to write to %s.", __func__, update_sdp_enum_timeout_path.c_str()); } else { @@ -494,15 +476,20 @@ ScopedAStatus UsbGadget::setCurrentUsbFunctions(long functions, std::unique_lock lk(mLockSetCurrentFunction); std::string current_usb_power_operation_mode, current_usb_type; std::string usb_limit_sink_enable; - - string accessoryCurrentLimitEnablePath, accessoryCurrentLimitPath, path; + std::string accessoryCurrentLimitEnablePath, accessoryCurrentLimitPath; mCurrentUsbFunctions = functions; mCurrentUsbFunctionsApplied = false; - getI2cBusHelper(&path); - accessoryCurrentLimitPath = kI2CPath + path + "/" + kAccessoryLimitCurrent; - accessoryCurrentLimitEnablePath = kI2CPath + path + "/" + kAccessoryLimitCurrentEnable; + if (mI2cClientPath.empty()) { + mI2cClientPath = getI2cClientPath(kHsi2cPath, kTcpcDevName, kI2cClientId); + if (mI2cClientPath.empty()) { + ALOGE("%s: Unable to locate i2c bus node", __func__); + } + } + + accessoryCurrentLimitPath = mI2cClientPath + kAccessoryLimitCurrent; + accessoryCurrentLimitEnablePath = mI2cClientPath + kAccessoryLimitCurrentEnable; // Get the gadget IRQ number before tearDownGadget() if (mGadgetIrqPath.empty()) diff --git a/usb/gadget/UsbGadget.h b/usb/gadget/UsbGadget.h index 34330815..d117b910 100644 --- a/usb/gadget/UsbGadget.h +++ b/usb/gadget/UsbGadget.h @@ -118,6 +118,7 @@ struct UsbGadget : public BnUsbGadget { // Indicates to the kernel that the gadget service is ready and the kernel can // set SDP timeout to a lower value. void updateSdpEnumTimeout(); + std::string mI2cClientPath; private: Status tearDownGadget(); diff --git a/usb/usb/Usb.cpp b/usb/usb/Usb.cpp index 8725bc83..cff00bda 100644 --- a/usb/usb/Usb.cpp +++ b/usb/usb/Usb.cpp @@ -43,8 +43,9 @@ #include #include -#include #include +#include +#include namespace usb_flags = android::hardware::usb::flags; @@ -55,6 +56,7 @@ using android::base::Trim; using android::hardware::google::pixel::getStatsService; using android::hardware::google::pixel::PixelAtoms::VendorUsbPortOverheat; using android::hardware::google::pixel::reportUsbPortOverheat; +using android::hardware::google::pixel::usb::getI2cClientPath; using android::String8; using android::Vector; @@ -67,18 +69,19 @@ volatile bool destroyThread; string enabledPath; constexpr char kHsi2cPath[] = "/sys/devices/platform/10d60000.hsi2c"; -constexpr char kI2CPath[] = "/sys/devices/platform/10d60000.hsi2c/i2c-"; +constexpr char kTcpcDevName[] = "i2c-max77759tcpc"; +constexpr char kI2cClientId[] = "0025"; constexpr char kComplianceWarningsPath[] = "device/non_compliant_reasons"; constexpr char kComplianceWarningBC12[] = "bc12"; constexpr char kComplianceWarningDebugAccessory[] = "debug-accessory"; constexpr char kComplianceWarningMissingRp[] = "missing_rp"; constexpr char kComplianceWarningOther[] = "other"; constexpr char kComplianceWarningInputPowerLimited[] = "input_power_limited"; -constexpr char kContaminantDetectionPath[] = "i2c-max77759tcpc/contaminant_detection"; -constexpr char kStatusPath[] = "i2c-max77759tcpc/contaminant_detection_status"; -constexpr char kSinkLimitEnable[] = "i2c-max77759tcpc/usb_limit_sink_enable"; -constexpr char kSourceLimitEnable[] = "i2c-max77759tcpc/usb_limit_source_enable"; -constexpr char kSinkLimitCurrent[] = "i2c-max77759tcpc/usb_limit_sink_current"; +constexpr char kContaminantDetectionPath[] = "contaminant_detection"; +constexpr char kStatusPath[] = "contaminant_detection_status"; +constexpr char kSinkLimitEnable[] = "usb_limit_sink_enable"; +constexpr char kSourceLimitEnable[] = "usb_limit_source_enable"; +constexpr char kSinkLimitCurrent[] = "usb_limit_sink_current"; constexpr char kTypecPath[] = "/sys/class/typec"; constexpr char kDisableContatminantDetection[] = "vendor.usb.contaminantdisable"; constexpr char kOverheatStatsPath[] = "/sys/devices/platform/google,usbc_port_cooling_dev/"; @@ -245,31 +248,9 @@ ScopedAStatus Usb::resetUsbPort(const std::string& in_portName, int64_t in_trans return ::ndk::ScopedAStatus::ok(); } -Status getI2cBusHelper(string *name) { - DIR *dp; - - dp = opendir(kHsi2cPath); - if (dp != NULL) { - struct dirent *ep; - - while ((ep = readdir(dp))) { - if (ep->d_type == DT_DIR) { - if (string::npos != string(ep->d_name).find("i2c-")) { - std::strtok(ep->d_name, "-"); - *name = std::strtok(NULL, "-"); - } - } - } - closedir(dp); - return Status::SUCCESS; - } - - ALOGE("Failed to open %s", kHsi2cPath); - return Status::ERROR; -} - -Status queryMoistureDetectionStatus(std::vector *currentPortStatus) { - string enabled, status, path, DetectedPath; +Status queryMoistureDetectionStatus(android::hardware::usb::Usb *usb, + std::vector *currentPortStatus) { + string enabled, status, DetectedPath; (*currentPortStatus)[0].supportedContaminantProtectionModes .push_back(ContaminantProtectionMode::FORCE_DISABLE); @@ -278,8 +259,15 @@ Status queryMoistureDetectionStatus(std::vector *currentPortStatus) (*currentPortStatus)[0].supportsEnableContaminantPresenceDetection = true; (*currentPortStatus)[0].supportsEnableContaminantPresenceProtection = false; - getI2cBusHelper(&path); - enabledPath = kI2CPath + path + "/" + kContaminantDetectionPath; + if (usb->mI2cClientPath.empty()) { + usb->mI2cClientPath = getI2cClientPath(kHsi2cPath, kTcpcDevName, kI2cClientId); + if (usb->mI2cClientPath.empty()) { + ALOGE("%s: Unable to locate i2c bus node", __func__); + return Status::ERROR; + } + } + + enabledPath = usb->mI2cClientPath + kContaminantDetectionPath; if (!ReadFileToString(enabledPath, &enabled)) { ALOGE("Failed to open moisture_detection_enabled"); return Status::ERROR; @@ -287,7 +275,7 @@ Status queryMoistureDetectionStatus(std::vector *currentPortStatus) enabled = Trim(enabled); if (enabled == "1") { - DetectedPath = kI2CPath + path + "/" + kStatusPath; + DetectedPath = usb->mI2cClientPath + kStatusPath; if (!ReadFileToString(DetectedPath, &status)) { ALOGE("Failed to open moisture_detected"); return Status::ERROR; @@ -562,7 +550,8 @@ Usb::Usb() ThrottlingSeverity::NONE)}, kSamplingIntervalSec), mUsbDataEnabled(true), mUsbHubVendorCmdValue(GL852G_VENDOR_CMD_VALUE_DEFAULT), - mUsbHubVendorCmdIndex(GL852G_VENDOR_CMD_INDEX_DEFAULT) { + mUsbHubVendorCmdIndex(GL852G_VENDOR_CMD_INDEX_DEFAULT), + mI2cClientPath("") { pthread_condattr_t attr; if (pthread_condattr_init(&attr)) { ALOGE("pthread_condattr_init failed: %s", strerror(errno)); @@ -650,12 +639,19 @@ ScopedAStatus Usb::limitPowerTransfer(const string& in_portName, bool in_limit, int64_t in_transactionId) { bool sessionFail = false, success; std::vector currentPortStatus; - string path, sinkLimitEnablePath, currentLimitPath, sourceLimitEnablePath; + string sinkLimitEnablePath, currentLimitPath, sourceLimitEnablePath; - getI2cBusHelper(&path); - sinkLimitEnablePath = kI2CPath + path + "/" + kSinkLimitEnable; - currentLimitPath = kI2CPath + path + "/" + kSinkLimitCurrent; - sourceLimitEnablePath = kI2CPath + path + "/" + kSourceLimitEnable; + if (mI2cClientPath.empty()) { + mI2cClientPath = getI2cClientPath(kHsi2cPath, kTcpcDevName, kI2cClientId); + if (mI2cClientPath.empty()) { + ALOGE("%s: Unable to locate i2c bus node", __func__); + return ScopedAStatus::ok(); + } + } + + sinkLimitEnablePath = mI2cClientPath + kSinkLimitEnable; + currentLimitPath = mI2cClientPath + kSinkLimitCurrent; + sourceLimitEnablePath = mI2cClientPath + kSourceLimitEnable; pthread_mutex_lock(&mLock); if (in_limit) { @@ -695,11 +691,19 @@ ScopedAStatus Usb::limitPowerTransfer(const string& in_portName, bool in_limit, return ScopedAStatus::ok(); } -Status queryPowerTransferStatus(std::vector *currentPortStatus) { - string limitedPath, enabled, path; +Status queryPowerTransferStatus(android::hardware::usb::Usb *usb, + std::vector *currentPortStatus) { + string limitedPath, enabled; - getI2cBusHelper(&path); - limitedPath = kI2CPath + path + "/" + kSinkLimitEnable; + if (usb->mI2cClientPath.empty()) { + usb->mI2cClientPath = getI2cClientPath(kHsi2cPath, kTcpcDevName, kI2cClientId); + if (usb->mI2cClientPath.empty()) { + ALOGE("%s: Unable to locate i2c bus node", __func__); + return Status::ERROR; + } + } + + limitedPath = usb->mI2cClientPath + kSinkLimitEnable; if (!ReadFileToString(limitedPath, &enabled)) { ALOGE("Failed to open limit_sink_enable"); return Status::ERROR; @@ -953,8 +957,8 @@ void queryVersionHelper(android::hardware::usb::Usb *usb, Status status; pthread_mutex_lock(&usb->mLock); status = getPortStatusHelper(usb, currentPortStatus); - queryMoistureDetectionStatus(currentPortStatus); - queryPowerTransferStatus(currentPortStatus); + queryMoistureDetectionStatus(usb, currentPortStatus); + queryPowerTransferStatus(usb, currentPortStatus); queryNonCompliantChargerStatus(currentPortStatus); queryUsbDataSession(usb, currentPortStatus); if (usb->mCallback != NULL) { diff --git a/usb/usb/Usb.h b/usb/usb/Usb.h index 495a467f..779e7254 100644 --- a/usb/usb/Usb.h +++ b/usb/usb/Usb.h @@ -99,6 +99,7 @@ struct Usb : public BnUsb { // Usb hub vendor command settings for JK level tuning int mUsbHubVendorCmdValue; int mUsbHubVendorCmdIndex; + std::string mI2cClientPath; private: pthread_t mPoll; From 2371ea79208c8d4e4b12b565b9d66cd47e5e189c Mon Sep 17 00:00:00 2001 From: Kyle Tso Date: Thu, 4 Jan 2024 12:26:17 +0800 Subject: [PATCH 25/41] usb: Select usb-service rc files based on kernel versions The sysfs paths in the rc file differ across kernel versions or build targets. Given that the path is static in the newer kernels (6.1+), modify the paths for newer kernels in the original rc file and create another rc file for older kernels (i.e kernel 5.10). Put the correct rc file to the vendor partition based on kernel versions. Bug: 317946158 Change-Id: Ie313664ee14c837bc9f33113e9341f6e06192401 Signed-off-by: Kyle Tso --- device.mk | 6 + .../android.hardware.usb.gadget-service.rc | 1 - usb/usb/Android.bp | 17 +- .../android.hardware.usb-service-legacy.rc | 153 +++++++++++++++++ usb/usb/android.hardware.usb-service.rc | 155 ++---------------- 5 files changed, 190 insertions(+), 142 deletions(-) create mode 100644 usb/usb/android.hardware.usb-service-legacy.rc diff --git a/device.mk b/device.mk index 04284533..673bc07e 100644 --- a/device.mk +++ b/device.mk @@ -449,6 +449,12 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ android.hardware.usb.gadget-service +ifneq (,$(filter 5.10, $(TARGET_LINUX_KERNEL_VERSION))) +PRODUCT_PACKAGES += usb_service_init_rc_legacy +else +PRODUCT_PACKAGES += usb_service_init_rc +endif + # MIDI feature PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml diff --git a/usb/gadget/android.hardware.usb.gadget-service.rc b/usb/gadget/android.hardware.usb.gadget-service.rc index 68fd3ae7..752a6c83 100644 --- a/usb/gadget/android.hardware.usb.gadget-service.rc +++ b/usb/gadget/android.hardware.usb.gadget-service.rc @@ -7,7 +7,6 @@ on post-fs chown root system /sys/class/typec/port0/power_role chown root system /sys/class/typec/port0/data_role chown root system /sys/class/typec/port0/port_type - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/contaminant_detection chown root system /sys/devices/platform/11210000.usb/dwc3_exynos_otg_b_sess chown root system /sys/devices/platform/11210000.usb/dwc3_exynos_otg_id chown root system /sys/devices/platform/11210000.usb/usb_data_enabled diff --git a/usb/usb/Android.bp b/usb/usb/Android.bp index 609af179..c95f020f 100644 --- a/usb/usb/Android.bp +++ b/usb/usb/Android.bp @@ -28,7 +28,6 @@ package { cc_binary { name: "android.hardware.usb-service", relative_install_path: "hw", - init_rc: ["android.hardware.usb-service.rc"], vintf_fragments: ["android.hardware.usb-service.xml"], vendor: true, srcs: [ @@ -69,6 +68,22 @@ cc_binary { ], } +prebuilt_etc { + name: "usb_service_init_rc", + vendor: true, + filename: "android.hardware.usb-service.rc", + src: "android.hardware.usb-service.rc", + sub_dir: "init", +} + +prebuilt_etc { + name: "usb_service_init_rc_legacy", + vendor: true, + filename: "android.hardware.usb-service-legacy.rc", + src: "android.hardware.usb-service-legacy.rc", + sub_dir: "init", +} + cc_aconfig_library { name: "android.hardware.usb.flags-aconfig-c-lib", vendor: true, diff --git a/usb/usb/android.hardware.usb-service-legacy.rc b/usb/usb/android.hardware.usb-service-legacy.rc new file mode 100644 index 00000000..d6ef15d5 --- /dev/null +++ b/usb/usb/android.hardware.usb-service-legacy.rc @@ -0,0 +1,153 @@ +service vendor.usb /vendor/bin/hw/android.hardware.usb-service + class hal + user system + group system shell wakelock usb + capabilities WAKE_ALARM BLOCK_SUSPEND + +on post-fs + chown root system /sys/class/typec/port0/power_role + chown root system /sys/class/typec/port0/data_role + chown root system /sys/class/typec/port0/port_type + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/class/typec/port0/power_role + chmod 664 /sys/class/typec/port0/data_role + chmod 664 /sys/class/typec/port0/port_type + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/update_sdp_enum_timeout diff --git a/usb/usb/android.hardware.usb-service.rc b/usb/usb/android.hardware.usb-service.rc index d6ef15d5..b5412413 100644 --- a/usb/usb/android.hardware.usb-service.rc +++ b/usb/usb/android.hardware.usb-service.rc @@ -8,146 +8,21 @@ on post-fs chown root system /sys/class/typec/port0/power_role chown root system /sys/class/typec/port0/data_role chown root system /sys/class/typec/port0/port_type - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/update_sdp_enum_timeout chmod 664 /sys/class/typec/port0/power_role chmod 664 /sys/class/typec/port0/data_role chmod 664 /sys/class/typec/port0/port_type - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/update_sdp_enum_timeout + From 0873870552e759cc5ebaea7b5991a35dbc33e0c5 Mon Sep 17 00:00:00 2001 From: Joen Chen Date: Wed, 31 Jan 2024 14:56:13 +0000 Subject: [PATCH 26/41] gs201: enable dynamic color mode Enable dynamic color mode to reduce the power overhead of color space conversion when GPU composition exists. Bug: 315787778 Test: check "dumpsys SurfaceFlinger" and state of display color service when playing SDR/HDR video Change-Id: Ie9e87091385ab5247141bf956fbaba3275cc6811 --- device.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/device.mk b/device.mk index 673bc07e..018b6f75 100644 --- a/device.mk +++ b/device.mk @@ -711,10 +711,8 @@ PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.use_color_management=tr PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.protected_contents=true PRODUCT_DEFAULT_PROPERTY_OVERRIDES += ro.surface_flinger.display_update_imminent_timeout_ms=50 -# force to blend in P3 mode PRODUCT_PROPERTY_OVERRIDES += \ - persist.sys.sf.native_mode=2 \ - persist.sys.sf.color_mode=9 + persist.sys.sf.native_mode=2 PRODUCT_COPY_FILES += \ device/google/gs201/display/display_colordata_cal0.pb:$(TARGET_COPY_OUT_VENDOR)/etc/display_colordata_cal0.pb From 21dc8acdaa5a17372f5dea63c5c44c1977cb941f Mon Sep 17 00:00:00 2001 From: Jacky Liu Date: Tue, 6 Feb 2024 14:01:49 +0800 Subject: [PATCH 27/41] Revert "usb: Select usb-service rc files based on kernel versions" This reverts commit 2371ea79208c8d4e4b12b565b9d66cd47e5e189c. Use the same i2c device paths across all kernel versions. Bug: 323447554 Change-Id: I0f970347a09e01f272a54fc7c940ea576a9e510b Signed-off-by: Jacky Liu --- device.mk | 6 - .../android.hardware.usb.gadget-service.rc | 1 + usb/usb/Android.bp | 17 +- .../android.hardware.usb-service-legacy.rc | 153 ----------------- usb/usb/android.hardware.usb-service.rc | 155 ++++++++++++++++-- 5 files changed, 142 insertions(+), 190 deletions(-) delete mode 100644 usb/usb/android.hardware.usb-service-legacy.rc diff --git a/device.mk b/device.mk index 018b6f75..3865cf8c 100644 --- a/device.mk +++ b/device.mk @@ -449,12 +449,6 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ android.hardware.usb.gadget-service -ifneq (,$(filter 5.10, $(TARGET_LINUX_KERNEL_VERSION))) -PRODUCT_PACKAGES += usb_service_init_rc_legacy -else -PRODUCT_PACKAGES += usb_service_init_rc -endif - # MIDI feature PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.software.midi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.midi.xml diff --git a/usb/gadget/android.hardware.usb.gadget-service.rc b/usb/gadget/android.hardware.usb.gadget-service.rc index 752a6c83..68fd3ae7 100644 --- a/usb/gadget/android.hardware.usb.gadget-service.rc +++ b/usb/gadget/android.hardware.usb.gadget-service.rc @@ -7,6 +7,7 @@ on post-fs chown root system /sys/class/typec/port0/power_role chown root system /sys/class/typec/port0/data_role chown root system /sys/class/typec/port0/port_type + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/contaminant_detection chown root system /sys/devices/platform/11210000.usb/dwc3_exynos_otg_b_sess chown root system /sys/devices/platform/11210000.usb/dwc3_exynos_otg_id chown root system /sys/devices/platform/11210000.usb/usb_data_enabled diff --git a/usb/usb/Android.bp b/usb/usb/Android.bp index c95f020f..609af179 100644 --- a/usb/usb/Android.bp +++ b/usb/usb/Android.bp @@ -28,6 +28,7 @@ package { cc_binary { name: "android.hardware.usb-service", relative_install_path: "hw", + init_rc: ["android.hardware.usb-service.rc"], vintf_fragments: ["android.hardware.usb-service.xml"], vendor: true, srcs: [ @@ -68,22 +69,6 @@ cc_binary { ], } -prebuilt_etc { - name: "usb_service_init_rc", - vendor: true, - filename: "android.hardware.usb-service.rc", - src: "android.hardware.usb-service.rc", - sub_dir: "init", -} - -prebuilt_etc { - name: "usb_service_init_rc_legacy", - vendor: true, - filename: "android.hardware.usb-service-legacy.rc", - src: "android.hardware.usb-service-legacy.rc", - sub_dir: "init", -} - cc_aconfig_library { name: "android.hardware.usb.flags-aconfig-c-lib", vendor: true, diff --git a/usb/usb/android.hardware.usb-service-legacy.rc b/usb/usb/android.hardware.usb-service-legacy.rc deleted file mode 100644 index d6ef15d5..00000000 --- a/usb/usb/android.hardware.usb-service-legacy.rc +++ /dev/null @@ -1,153 +0,0 @@ -service vendor.usb /vendor/bin/hw/android.hardware.usb-service - class hal - user system - group system shell wakelock usb - capabilities WAKE_ALARM BLOCK_SUSPEND - -on post-fs - chown root system /sys/class/typec/port0/power_role - chown root system /sys/class/typec/port0/data_role - chown root system /sys/class/typec/port0/port_type - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/class/typec/port0/power_role - chmod 664 /sys/class/typec/port0/data_role - chmod 664 /sys/class/typec/port0/port_type - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/update_sdp_enum_timeout diff --git a/usb/usb/android.hardware.usb-service.rc b/usb/usb/android.hardware.usb-service.rc index b5412413..d6ef15d5 100644 --- a/usb/usb/android.hardware.usb-service.rc +++ b/usb/usb/android.hardware.usb-service.rc @@ -8,21 +8,146 @@ on post-fs chown root system /sys/class/typec/port0/power_role chown root system /sys/class/typec/port0/data_role chown root system /sys/class/typec/port0/port_type - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/update_sdp_enum_timeout chmod 664 /sys/class/typec/port0/power_role chmod 664 /sys/class/typec/port0/data_role chmod 664 /sys/class/typec/port0/port_type - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/7-0025/update_sdp_enum_timeout - + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/update_sdp_enum_timeout From 8548e9b2bea8e41865a5441b65b99a1e929d58ce Mon Sep 17 00:00:00 2001 From: Jacky Liu Date: Mon, 5 Feb 2024 20:00:25 +0800 Subject: [PATCH 28/41] Update i2c device paths Update i2c device paths with static bus numbers. Also remove some redundant paths. Bug: 323447554 Test: Boot to home Change-Id: Id3f0fccd39b70d247c0d7a17a1944223619ec40e --- conf/init.gs201.rc | 16 +- conf/ueventd.gs201.rc | 1 - disable_contaminant_detection.sh | 9 +- dumpstate/dump_power_gs201.sh | 66 ++------ .../android.hardware.usb.gadget-service.rc | 2 +- usb/usb/android.hardware.usb-service.rc | 154 ++---------------- 6 files changed, 41 insertions(+), 207 deletions(-) diff --git a/conf/init.gs201.rc b/conf/init.gs201.rc index decb3676..8668136f 100644 --- a/conf/init.gs201.rc +++ b/conf/init.gs201.rc @@ -225,13 +225,7 @@ on init chown system system /dev/maxfg_history # Dump 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 /sys/devices/platform/10da0000.hsi2c/i2c-5/5-0050/eeprom - chown system system /sys/devices/platform/10da0000.hsi2c/i2c-6/6-0050/eeprom - chown system system /sys/devices/platform/10da0000.hsi2c/i2c-7/7-0050/eeprom - chown system system /sys/devices/platform/10da0000.hsi2c/i2c-8/8-0050/eeprom - chown system system /sys/devices/platform/10da0000.hsi2c/i2c-9/9-0050/eeprom + chown system system /sys/devices/platform/10da0000.hsi2c/i2c-15/15-0050/eeprom # Loading common kernel modules in background start init_display @@ -734,11 +728,11 @@ on property:sys.boot_completed=1 write /proc/vendor_sched/pmu_poll_enable 0 # Make devices on the critical path for suspend/resume asynchronous - write /sys/devices/platform/acpm_mfd_bus@18110000/i2c-8/i2c-s2mpg13mfd/power/async "enabled" - write /sys/devices/platform/acpm_mfd_bus@18110000/i2c-8/power/async "enabled" + write /sys/devices/platform/acpm_mfd_bus@18110000/i2c-21/21-002f/power/async "enabled" + write /sys/devices/platform/acpm_mfd_bus@18110000/i2c-21/power/async "enabled" write /sys/devices/platform/acpm_mfd_bus@18110000/power/async "enabled" - write /sys/devices/platform/acpm_mfd_bus@18100000/i2c-7/i2c-s2mpg12mfd/power/async "enabled" - write /sys/devices/platform/acpm_mfd_bus@18100000/i2c-7/power/async "enabled" + write /sys/devices/platform/acpm_mfd_bus@18100000/i2c-20/20-001f/power/async "enabled" + write /sys/devices/platform/acpm_mfd_bus@18100000/i2c-20/power/async "enabled" write /sys/devices/platform/acpm_mfd_bus@18100000/power/async "enabled" write /sys/devices/platform/dbgdev-pd-hsi0/power/async "enabled" write /sys/devices/platform/fixedregulator@0/regulator/regulator.2/power/async "enabled" diff --git a/conf/ueventd.gs201.rc b/conf/ueventd.gs201.rc index 44ec74cb..faad3bd1 100644 --- a/conf/ueventd.gs201.rc +++ b/conf/ueventd.gs201.rc @@ -55,7 +55,6 @@ /dev/video55 0666 system graphics /dev/g2d 0660 system graphics /dev/fimg2d 0666 system graphics -/dev/i2c-2 0660 system system /dev/HPD 0660 system system # wfd diff --git a/disable_contaminant_detection.sh b/disable_contaminant_detection.sh index b5c22a78..d4677e48 100644 --- a/disable_contaminant_detection.sh +++ b/disable_contaminant_detection.sh @@ -1,7 +1,6 @@ #!/vendor/bin/sh -for f in /sys/devices/platform/10d60000.hsi2c/i2c-*/i2c-max77759tcpc; do - if [ -d $f ]; then - echo 0 > $f/contaminant_detection; - fi -done +max77759tcpc_path=/sys/devices/platform/10d60000.hsi2c/i2c-13/13-0025 +if [ -d $max77759tcpc_path ]; then + echo 0 > $max77759tcpc_path/contaminant_detection; +fi diff --git a/dumpstate/dump_power_gs201.sh b/dumpstate/dump_power_gs201.sh index 6613115f..301c29b8 100644 --- a/dumpstate/dump_power_gs201.sh +++ b/dumpstate/dump_power_gs201.sh @@ -100,23 +100,21 @@ then fi echo "\n------ TCPC ------" -for f in /sys/devices/platform/10d60000.hsi2c/i2c-*/i2c-max77759tcpc -do - echo "registers:" - cat $f/registers - echo "frs:" - cat $f/frs - echo "auto_discharge:" - cat $f/auto_discharge - echo "bc12_enabled:" - cat $f/bc12_enabled - echo "cc_toggle_enable:" - cat $f/cc_toggle_enable - echo "contaminant_detection:" - cat $f/contaminant_detection - echo "contaminant_detection_status:" - cat $f/contaminant_detection_status -done +max77759tcpc_path="/sys/devices/platform/10d60000.hsi2c/i2c-13/13-0025" +echo "registers:" +cat $max77759tcpc_path/registers +echo "frs:" +cat $max77759tcpc_path/frs +echo "auto_discharge:" +cat $max77759tcpc_path/auto_discharge +echo "bc12_enabled:" +cat $max77759tcpc_path/bc12_enabled +echo "cc_toggle_enable:" +cat $max77759tcpc_path/cc_toggle_enable +echo "contaminant_detection:" +cat $max77759tcpc_path/contaminant_detection +echo "contaminant_detection_status:" +cat $max77759tcpc_path/contaminant_detection_status echo "\n------ PD Engine ------" cat "/dev/logbuffer_usbpd" @@ -220,39 +218,9 @@ then fi echo "\n------ Battery EEPROM ------" -if [ -e "/sys/devices/platform/10970000.hsi2c/i2c-4/4-0050/eeprom" ] +if [ -e "/sys/devices/platform/10da0000.hsi2c/i2c-15/15-0050/eeprom" ] then - xxd /sys/devices/platform/10970000.hsi2c/i2c-4/4-0050/eeprom -fi - -if [ -e "/sys/devices/platform/10970000.hsi2c/i2c-5/5-0050/eeprom" ] -then - xxd /sys/devices/platform/10970000.hsi2c/i2c-5/5-0050/eeprom -fi - -if [ -e "/sys/devices/platform/10da0000.hsi2c/i2c-5/5-0050/eeprom" ] -then - xxd /sys/devices/platform/10da0000.hsi2c/i2c-5/5-0050/eeprom -fi - -if [ -e "/sys/devices/platform/10da0000.hsi2c/i2c-6/6-0050/eeprom" ] -then - xxd /sys/devices/platform/10da0000.hsi2c/i2c-6/6-0050/eeprom -fi - -if [ -e "/sys/devices/platform/10da0000.hsi2c/i2c-7/7-0050/eeprom" ] -then - xxd /sys/devices/platform/10da0000.hsi2c/i2c-7/7-0050/eeprom -fi - -if [ -e "/sys/devices/platform/10da0000.hsi2c/i2c-8/8-0050/eeprom" ] -then - xxd /sys/devices/platform/10da0000.hsi2c/i2c-8/8-0050/eeprom -fi - -if [ -e "/sys/devices/platform/10da0000.hsi2c/i2c-9/9-0050/eeprom" ] -then - xxd /sys/devices/platform/10da0000.hsi2c/i2c-9/9-0050/eeprom + xxd /sys/devices/platform/10da0000.hsi2c/i2c-15/15-0050/eeprom fi echo "\n------ Charger Stats ------" diff --git a/usb/gadget/android.hardware.usb.gadget-service.rc b/usb/gadget/android.hardware.usb.gadget-service.rc index 68fd3ae7..98fc8530 100644 --- a/usb/gadget/android.hardware.usb.gadget-service.rc +++ b/usb/gadget/android.hardware.usb.gadget-service.rc @@ -7,7 +7,7 @@ on post-fs chown root system /sys/class/typec/port0/power_role chown root system /sys/class/typec/port0/data_role chown root system /sys/class/typec/port0/port_type - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-13/13-0025/contaminant_detection chown root system /sys/devices/platform/11210000.usb/dwc3_exynos_otg_b_sess chown root system /sys/devices/platform/11210000.usb/dwc3_exynos_otg_id chown root system /sys/devices/platform/11210000.usb/usb_data_enabled diff --git a/usb/usb/android.hardware.usb-service.rc b/usb/usb/android.hardware.usb-service.rc index d6ef15d5..881317e1 100644 --- a/usb/usb/android.hardware.usb-service.rc +++ b/usb/usb/android.hardware.usb-service.rc @@ -8,146 +8,20 @@ on post-fs chown root system /sys/class/typec/port0/power_role chown root system /sys/class/typec/port0/data_role chown root system /sys/class/typec/port0/port_type - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/contaminant_detection - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_current - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_source_enable - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/update_sdp_enum_timeout - chown root system /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/update_sdp_enum_timeout + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-13/13-0025/contaminant_detection + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-13/13-0025/usb_limit_accessory_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-13/13-0025/usb_limit_accessory_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-13/13-0025/usb_limit_sink_current + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-13/13-0025/usb_limit_sink_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-13/13-0025/usb_limit_source_enable + chown root system /sys/devices/platform/10d60000.hsi2c/i2c-13/13-0025/update_sdp_enum_timeout chmod 664 /sys/class/typec/port0/power_role chmod 664 /sys/class/typec/port0/data_role chmod 664 /sys/class/typec/port0/port_type - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/contaminant_detection - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_accessory_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_current - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_sink_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/usb_limit_source_enable - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-0/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-1/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-2/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-3/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-4/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-5/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-6/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-7/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-8/i2c-max77759tcpc/update_sdp_enum_timeout - chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-9/i2c-max77759tcpc/update_sdp_enum_timeout + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-13/13-0025/contaminant_detection + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-13/13-0025/usb_limit_accessory_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-13/13-0025/usb_limit_accessory_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-13/13-0025/usb_limit_sink_current + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-13/13-0025/usb_limit_sink_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-13/13-0025/usb_limit_source_enable + chmod 664 /sys/devices/platform/10d60000.hsi2c/i2c-13/13-0025/update_sdp_enum_timeout From bef1509d6c098eed745df5a34341d3bf29d9a479 Mon Sep 17 00:00:00 2001 From: Yong Zhang Date: Wed, 7 Feb 2024 16:51:36 +0000 Subject: [PATCH 29/41] Add Youtube back in MRR Small Area Detection Allowlist Bug: 324132231 Test: Make Pixel builds to verify Allowlist Change-Id: I5b8f96acfd701887307d0f19566a1489b1ad594d --- overlay/frameworks/base/core/res/res/values/config.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/overlay/frameworks/base/core/res/res/values/config.xml b/overlay/frameworks/base/core/res/res/values/config.xml index e9e4f01b..f594fc6d 100644 --- a/overlay/frameworks/base/core/res/res/values/config.xml +++ b/overlay/frameworks/base/core/res/res/values/config.xml @@ -309,6 +309,7 @@ com.zhiliaoapp.musically:0.07 com.bilibili.app.in:0.07 com.twitter.android:0.07 + com.google.android.youtube:0.07 From 0e6bc4fd5c6d828e7f8a2ddaad8951d442475cee Mon Sep 17 00:00:00 2001 From: Richard Hsu Date: Mon, 5 Feb 2024 15:06:55 -0800 Subject: [PATCH 30/41] [Refactor] Include edgetpu targets in final image Make the EdgeTPU targets defined in /proprietary visible by product packages included in edgetpu.mk. Bug: 323601370 Tested: No functionality change. Edgetpu services still work. Change-Id: Ib3835ee3976dcfa86df999d0a32398bf8ec9a2cb --- device.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/device.mk b/device.mk index 3865cf8c..ec4d08dd 100644 --- a/device.mk +++ b/device.mk @@ -1065,6 +1065,14 @@ PRODUCT_PROPERTY_OVERRIDES += persist.vendor.enable.thermal.genl=true include device/google/gs-common/edgetpu/edgetpu.mk # Config variables for TPU chip on device. $(call soong_config_set,edgetpu_config,chip,janeiro) +# Include the edgetpu targets defined the namespaces below into the final image. +PRODUCT_SOONG_NAMESPACES += \ + vendor/google_devices/gs201/proprietary/gchips/tpu/metrics \ + vendor/google_devices/gs201/proprietary/gchips/tpu/tflite_delegate \ + vendor/google_devices/gs201/proprietary/gchips/tpu/darwinn_logging_service \ + vendor/google_devices/gs201/proprietary/gchips/tpu/nnapi_stable_aidl \ + vendor/google_devices/gs201/proprietary/gchips/tpu/aidl \ + vendor/google_devices/gs201/proprietary/gchips/tpu/hal # TPU firmware PRODUCT_PACKAGES += edgetpu-janeiro.fw From ba206cfef1d9383d6462e5d21b3c02bebb2de3f5 Mon Sep 17 00:00:00 2001 From: Mark Chang Date: Wed, 31 Jan 2024 12:49:48 +0000 Subject: [PATCH 31/41] Move manifest entries to gs-common. Bug: 322914403 Bug: 324214410 Test: build succeeds on all devices, failing tests pass. Change-Id: I0711a1d8cfd02ccd168f57ac16feee2a8e0ee777 Signed-off-by: Mark Chang --- device.mk | 3 +++ device_framework_matrix_product.xml | 8 -------- manifest-gralloc3.xml | 8 -------- manifest.xml | 8 -------- 4 files changed, 3 insertions(+), 24 deletions(-) diff --git a/device.mk b/device.mk index ec4d08dd..c728ca9a 100644 --- a/device.mk +++ b/device.mk @@ -1159,3 +1159,6 @@ include hardware/google/pixel/HardwareInfo/HardwareInfo.mk # UFS: the script is used to select the corresponding firmware to run FFU. PRODUCT_PACKAGES += ufs_firmware_update.sh + +# Touch service +include device/google/gs-common/touch/twoshay/aidl_gs101.mk diff --git a/device_framework_matrix_product.xml b/device_framework_matrix_product.xml index 9d626258..b3d37877 100644 --- a/device_framework_matrix_product.xml +++ b/device_framework_matrix_product.xml @@ -84,14 +84,6 @@ default - - com.google.input - 2 - - ITouchContextService - default - - hardware.qorvo.uwb 2 diff --git a/manifest-gralloc3.xml b/manifest-gralloc3.xml index cd405200..5cce8cf3 100644 --- a/manifest-gralloc3.xml +++ b/manifest-gralloc3.xml @@ -86,14 +86,6 @@ hwbinder @1.3::IDevice/google-edgetpu - - com.google.input - 2 - - ITouchContextService - default - - vendor.google.google_battery 2-3 diff --git a/manifest.xml b/manifest.xml index a5cf98dc..34b0326d 100644 --- a/manifest.xml +++ b/manifest.xml @@ -12,12 +12,4 @@ android.hardware.boot IBootControl/default - - com.google.input - 2 - - ITouchContextService - default - - From 49a63dad63edcb86ffd2b82068a8de1ae5d6b340 Mon Sep 17 00:00:00 2001 From: George Lee Date: Wed, 14 Feb 2024 22:57:46 +0000 Subject: [PATCH 32/41] bcl: Adjust GPU clk divider ratio Revert GPU clk divider ratios. Bug: 324534203 Test: Confirm no DATA_INVALID_FAULT while running GFXBench under stress Change-Id: I84682b476af162eff904ed5bec66ae2e6fa6449a Signed-off-by: George Lee --- conf/init.gs201.rc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conf/init.gs201.rc b/conf/init.gs201.rc index 8668136f..abc18c58 100644 --- a/conf/init.gs201.rc +++ b/conf/init.gs201.rc @@ -897,9 +897,9 @@ on property:vendor.brownout.mitigation.ready=1 write /sys/devices/virtual/pmic/mitigation/clock_ratio/tpu_light_clk_ratio 0x80041c3 #DFS write /sys/devices/virtual/pmic/mitigation/clock_ratio/cpu1_heavy_clk_ratio 0xfff041c0 #DFS write /sys/devices/virtual/pmic/mitigation/clock_ratio/cpu2_heavy_clk_ratio 0xfff041c0 #DFS - write /sys/devices/virtual/pmic/mitigation/clock_ratio/gpu_light_clk_ratio 0x80041c3 #DFS + write /sys/devices/virtual/pmic/mitigation/clock_ratio/gpu_light_clk_ratio 0xfff041c1 #DFS write /sys/devices/virtual/pmic/mitigation/clock_ratio/cpu2_light_clk_ratio 0xfff041c3 #OCP - write /sys/devices/virtual/pmic/mitigation/clock_ratio/gpu_heavy_clk_ratio 0xfff04381 #OCP + write /sys/devices/virtual/pmic/mitigation/clock_ratio/gpu_heavy_clk_ratio 0xfff04385 #OCP write /sys/devices/virtual/pmic/mitigation/clock_ratio/tpu_heavy_clk_ratio 0xfff041c1 #OCP write /sys/devices/virtual/pmic/mitigation/triggered_lvl/uvlo1_lvl 3200 write /sys/devices/virtual/pmic/mitigation/triggered_lvl/smpl_lvl 3100 From b13512dd9baeaea02380fdc376ba6dba0e1159ec Mon Sep 17 00:00:00 2001 From: Lei Ju Date: Sat, 17 Feb 2024 14:48:57 -0800 Subject: [PATCH 33/41] [gs201] Enable multiclient HAL Test: 1) complile and flash a gs201 device, passed PTS and CHQTS; 2) checked logs to make sure no sepolicy violations Bug: 247124878 Change-Id: I0b0af38e89c13d645406bb1d30786bb25a74d963 --- device.mk | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/device.mk b/device.mk index c728ca9a..d6b2aac6 100644 --- a/device.mk +++ b/device.mk @@ -71,7 +71,7 @@ PRODUCT_SOONG_NAMESPACES += \ hardware/google/pixel \ device/google/gs201 \ device/google/gs201/powerstats \ - system/chre/host/hal_generic \ + vendor/google_devices/common/chre/host/hal \ vendor/google/whitechapel/tools \ vendor/google/interfaces \ vendor/google_devices/common/proprietary/confirmatioui_hal \ @@ -368,25 +368,21 @@ PRODUCT_HOST_PACKAGES += \ PRODUCT_PACKAGES += \ messaging -# Contexthub HAL -PRODUCT_PACKAGES += \ - android.hardware.contexthub-service.generic - -# CHRE tools +# CHRE +## tools ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT))) PRODUCT_PACKAGES += \ chre_power_test_client \ - chre_test_client + chre_test_client \ + chre_aidl_hal_client endif +## HAL +include device/google/gs-common/chre/hal.mk PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.context_hub.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.context_hub.xml - -## Enable the CHRE Daemon -CHRE_USF_DAEMON_ENABLED := true CHRE_DEDICATED_TRANSPORT_CHANNEL_ENABLED := true PRODUCT_PACKAGES += \ - chre \ preloaded_nanoapps.json # Filesystem management tools From 3edeae32e0eec77e4f90e971e328ecddaa8203bf Mon Sep 17 00:00:00 2001 From: Daniel Okazaki Date: Thu, 15 Feb 2024 23:03:21 +0000 Subject: [PATCH 34/41] dumpstate: moving charger nodes to user build Bug: 323415060 Test: adb bugreport Change-Id: I96c06149ad0b960b2fa9116fca126311116fa9d0 Signed-off-by: Daniel Okazaki --- dumpstate/dump_power_gs201.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dumpstate/dump_power_gs201.sh b/dumpstate/dump_power_gs201.sh index 301c29b8..64d75566 100644 --- a/dumpstate/dump_power_gs201.sh +++ b/dumpstate/dump_power_gs201.sh @@ -165,14 +165,15 @@ do echo "$f: `cat $f`" done +echo "\n------ DC_registers dump ------" +cat "/sys/class/power_supply/pca94xx-mains/device/registers_dump" +echo "\n------ max77759_chg registers dump ------" +cat "/sys/class/power_supply/main-charger/device/registers_dump" +echo "\n------ max77729_pmic registers dump ------" +cat /sys/devices/platform/*.hsi2c/i2c-*/*-0066/registers_dump + if [ $build_type = "userdebug" ] then - echo "\n------ DC_registers dump ------" - cat "/sys/class/power_supply/pca94xx-mains/device/registers_dump" - echo "\n------ max77759_chg registers dump ------" - cat "/d/max77759_chg/registers" - echo "\n------ max77729_pmic registers dump ------" - cat "/d/max77729_pmic/registers" echo "\n------ Charging table dump ------" cat "/d/google_battery/chg_raw_profile" From 5e9bc66da0f1651ac5369b19fd85e7c5e165b962 Mon Sep 17 00:00:00 2001 From: Jenny Ho Date: Fri, 23 Feb 2024 22:24:52 +0800 Subject: [PATCH 35/41] pixelstats: gs201: add Learning/Update/ModelLoad path Upload more FG data to analyze its trends Bug: 317827237 Change-Id: Id45bd9ad3cca67dfc614f9c0f00540b1119a17d0 Signed-off-by: Jenny Ho --- pixelstats/pixelstats-vendor.gs201.rc | 2 ++ pixelstats/service.cpp | 12 +++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pixelstats/pixelstats-vendor.gs201.rc b/pixelstats/pixelstats-vendor.gs201.rc index 70d875ea..6f6da84d 100644 --- a/pixelstats/pixelstats-vendor.gs201.rc +++ b/pixelstats/pixelstats-vendor.gs201.rc @@ -1,4 +1,6 @@ on property:sys.boot_completed=1 + chown system system /sys/class/power_supply/maxfg_base/fg_learning_events + chown system system /sys/class/power_supply/maxfg/fg_learning_events start vendor.pixelstats_vendor on post-fs-data chown system system /sys/kernel/metrics/irq/stats_reset diff --git a/pixelstats/service.cpp b/pixelstats/service.cpp index ab6f85f2..714a24dd 100644 --- a/pixelstats/service.cpp +++ b/pixelstats/service.cpp @@ -94,7 +94,17 @@ const struct SysfsCollector::SysfsPaths sysfs_paths = { const struct UeventListener::UeventPaths ueventPaths = { .AudioUevent = "/devices/virtual/amcs/amcs", - .TypeCPartnerUevent = "PRODUCT_TYPE="}; + .TypeCPartnerUevent = "PRODUCT_TYPE=", + .FGLearningPath = { + "/sys/class/power_supply/maxfg/fg_learning_events", + "/sys/class/power_supply/maxfg_base/fg_learning_events" + }, + .FwUpdatePath = "", + .FGModelLoadingPath = { + "/sys/class/power_supply/maxfg/m5_model_state", + "/sys/class/power_supply/maxfg_base/m5_model_state" + } +}; int main() { LOG(INFO) << "starting PixelStats"; From 6e91bd9f0bf7cf5d076c0538c7ada5b2cb294a53 Mon Sep 17 00:00:00 2001 From: Hongyang Jiao Date: Fri, 23 Feb 2024 19:34:22 +0000 Subject: [PATCH 36/41] Add betterbug mk to gs201 Bug: 322543833 Test: local test, recorded in http://shortn/_iEz9DTCHgo Change-Id: I88809df5449909ac528d38e07fa95b8f49bbfd00 --- device.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/device.mk b/device.mk index d6b2aac6..04585d5b 100644 --- a/device.mk +++ b/device.mk @@ -37,6 +37,7 @@ include device/google/gs-common/sota_app/factoryota.mk include device/google/gs-common/misc_writer/misc_writer.mk include device/google/gs-common/gyotaku_app/gyotaku.mk include device/google/gs-common/bootctrl/bootctrl_aidl.mk +include device/google/gs-common/betterbug/betterbug.mk ifneq ($(filter cheetah felix panther, $(TARGET_PRODUCT)),) include device/google/gs-common/bcmbt/dump/dumplog.mk endif From 85b26e93ccb31d64b4052fc5f00a3aa0016d633c Mon Sep 17 00:00:00 2001 From: Jenny Ho Date: Wed, 21 Feb 2024 20:13:24 +0800 Subject: [PATCH 37/41] pixelstats: added multiple GMSR paths support different project paths Bug: 308364170 Change-Id: I065f8e844d13d1d6d36c36ef689ff6c34b3e3fa6 Signed-off-by: Jenny Ho --- pixelstats/service.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pixelstats/service.cpp b/pixelstats/service.cpp index 714a24dd..595befbe 100644 --- a/pixelstats/service.cpp +++ b/pixelstats/service.cpp @@ -88,7 +88,10 @@ const struct SysfsCollector::SysfsPaths sysfs_paths = { .IRQStatsResetPath = "/sys/kernel/metrics/irq/stats_reset", .ModemPcieLinkStatsPath = "/sys/devices/platform/11920000.pcie/link_stats", .WifiPcieLinkStatsPath = "/sys/devices/platform/14520000.pcie/link_stats", - .GMSRPath = "/sys/class/power_supply/maxfg/gmsr", + .GMSRPath = { + "/sys/class/power_supply/maxfg/gmsr", + "/sys/class/power_supply/maxfg_base/gmsr", + }, .TotalCallCountPath = "/sys/devices/platform/audiometrics/call_count" }; From a528a2c7f9c7b13c791a9c9eae6c1b87ed015106 Mon Sep 17 00:00:00 2001 From: George Lee Date: Tue, 5 Mar 2024 00:36:35 +0000 Subject: [PATCH 38/41] bcl: Adjust GPU LIGHT clk divider ratio Set GPU LIGHT clk divider ratios to /2. Bug: 327700285 Test: Confirm no prints like: "28000000.mali: Ctx 8349_23 Group 0 CSG 3 CSI: 3" while running GFXBench under LIGHT MITIGATION Signed-off-by: George Lee (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:43d42739b57713f7e41df147e6372d1ccce6243f) Merged-In: I4b62b33c0b72e5a053f477943379727d58f7298e Change-Id: I4b62b33c0b72e5a053f477943379727d58f7298e --- conf/init.gs201.rc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/init.gs201.rc b/conf/init.gs201.rc index abc18c58..09898cbd 100644 --- a/conf/init.gs201.rc +++ b/conf/init.gs201.rc @@ -897,7 +897,7 @@ on property:vendor.brownout.mitigation.ready=1 write /sys/devices/virtual/pmic/mitigation/clock_ratio/tpu_light_clk_ratio 0x80041c3 #DFS write /sys/devices/virtual/pmic/mitigation/clock_ratio/cpu1_heavy_clk_ratio 0xfff041c0 #DFS write /sys/devices/virtual/pmic/mitigation/clock_ratio/cpu2_heavy_clk_ratio 0xfff041c0 #DFS - write /sys/devices/virtual/pmic/mitigation/clock_ratio/gpu_light_clk_ratio 0xfff041c1 #DFS + write /sys/devices/virtual/pmic/mitigation/clock_ratio/gpu_light_clk_ratio 0xfff041c3 #DFS write /sys/devices/virtual/pmic/mitigation/clock_ratio/cpu2_light_clk_ratio 0xfff041c3 #OCP write /sys/devices/virtual/pmic/mitigation/clock_ratio/gpu_heavy_clk_ratio 0xfff04385 #OCP write /sys/devices/virtual/pmic/mitigation/clock_ratio/tpu_heavy_clk_ratio 0xfff041c1 #OCP From 3954e3a89a32f1290981e51a26814a04784f216c Mon Sep 17 00:00:00 2001 From: Shashwat Razdan Date: Tue, 5 Mar 2024 20:06:04 -0800 Subject: [PATCH 39/41] Adding android.software.contextualsearch to gs-201 devices. Bug: 326143814 Test: Built and tested on device (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:e9e4f853a6847a55f2bedc8fc37c17f44c1fa743) Merged-In: Iad8cd8a859299a5a60e0bdc569f7da4756bb95eb Change-Id: Iad8cd8a859299a5a60e0bdc569f7da4756bb95eb --- device.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/device.mk b/device.mk index 04585d5b..0aa5bd6c 100644 --- a/device.mk +++ b/device.mk @@ -259,6 +259,7 @@ PRODUCT_COPY_FILES += \ frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \ frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.compute.xml \ frameworks/native/data/etc/android.software.vulkan.deqp.level-2023-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \ + frameworks/native/data/etc/android.software.contextualsearch.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.contextualsearch.xml \ frameworks/native/data/etc/android.software.opengles.deqp.level-2023-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml ifeq ($(USE_SWIFTSHADER),true) From 49634ee89567439488fcc2dac6bd9bca5d3f85d7 Mon Sep 17 00:00:00 2001 From: Daniel Chapin Date: Tue, 5 Mar 2024 00:55:40 +0000 Subject: [PATCH 40/41] Revert "Add betterbug mk to gs201" Revert submission 26348985-bb-sepolicy-poc Reason for revert: Droidfood blocking bug: b/327991669 Bug: b/327991669 Reverted changes: /q/submissionid:26348985-bb-sepolicy-poc (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3f5c12abada31befa0d9f869bf6628d06ee05aa4) Merged-In: Id77188dd9f6f5acaed1506a9489f5d6f9874dde9 Change-Id: Id77188dd9f6f5acaed1506a9489f5d6f9874dde9 --- device.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/device.mk b/device.mk index 0aa5bd6c..42b007a1 100644 --- a/device.mk +++ b/device.mk @@ -37,7 +37,6 @@ include device/google/gs-common/sota_app/factoryota.mk include device/google/gs-common/misc_writer/misc_writer.mk include device/google/gs-common/gyotaku_app/gyotaku.mk include device/google/gs-common/bootctrl/bootctrl_aidl.mk -include device/google/gs-common/betterbug/betterbug.mk ifneq ($(filter cheetah felix panther, $(TARGET_PRODUCT)),) include device/google/gs-common/bcmbt/dump/dumplog.mk endif From 32333e15c9a2bf1b61636cef3c11743af628472b Mon Sep 17 00:00:00 2001 From: Vinay Kalia Date: Fri, 8 Mar 2024 20:30:40 +0000 Subject: [PATCH 41/41] gs201: bigocean: Enable width-height swap bug: 328331219 Test: android.mediav2.cts.CodecInfoTest#testResolutionSupport [29_video/av01_c2.google.av1.decoder] Signed-off-by: Vinay Kalia (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:dbec97c34f276661a30dad532fd08114bb219b54) Merged-In: Ib57dbaf32c2198e755e123cd894514bce5fb212e Change-Id: Ib57dbaf32c2198e755e123cd894514bce5fb212e --- media_codecs_bo_c2.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/media_codecs_bo_c2.xml b/media_codecs_bo_c2.xml index 3a397263..187df342 100644 --- a/media_codecs_bo_c2.xml +++ b/media_codecs_bo_c2.xml @@ -30,6 +30,7 @@ + @@ -45,6 +46,7 @@ +