Modify file path for i2c devices am: d06d5bdd23

Original change: https://googleplex-android-review.googlesource.com/c/device/google/gs101/+/14540730

Change-Id: Iaf7faf4b001df07d2e9069fbd7013e4865d806cb
This commit is contained in:
Manish Varma 2021-05-14 05:23:34 +00:00 committed by Automerger Merge Worker
commit b267dfbfb5
3 changed files with 10 additions and 10 deletions

View file

@ -776,8 +776,8 @@ on post-fs-data
# ODPM
on fs
chown system system /sys/devices/platform/acpm_mfd_bus@17500000/i2c-6/6-001f/s2mpg10-meter/s2mpg10-odpm/iio:device0/enabled_rails
chown system system /sys/devices/platform/acpm_mfd_bus@17510000/i2c-7/7-002f/s2mpg11-meter/s2mpg11-odpm/iio:device1/enabled_rails
chown system system /sys/devices/platform/acpm_mfd_bus@17500000/i2c-6/i2c-s2mpg10mfd/s2mpg10-meter/s2mpg10-odpm/iio:device0/enabled_rails
chown system system /sys/devices/platform/acpm_mfd_bus@17510000/i2c-7/i2c-s2mpg11mfd/s2mpg11-meter/s2mpg11-odpm/iio:device1/enabled_rails
chown system system /sys/devices/platform/acpm_mfd_bus@17500000/i2c-7/7-001f/s2mpg10-meter/s2mpg10-odpm/iio:device0/enabled_rails
chown system system /sys/devices/platform/acpm_mfd_bus@17510000/i2c-8/8-002f/s2mpg11-meter/s2mpg11-odpm/iio:device1/enabled_rails
chown system system /sys/devices/platform/acpm_mfd_bus@17500000/i2c-7/i2c-s2mpg10mfd/s2mpg10-meter/s2mpg10-odpm/iio:device0/enabled_rails
chown system system /sys/devices/platform/acpm_mfd_bus@17510000/i2c-8/i2c-s2mpg11mfd/s2mpg11-meter/s2mpg11-odpm/iio:device1/enabled_rails

View file

@ -92,8 +92,8 @@ volatile bool destroyThread;
std::string enabledPath;
constexpr char kHsi2cPath[] = "/sys/devices/platform/10d50000.hsi2c";
constexpr char kI2CPath[] = "/sys/devices/platform/10d50000.hsi2c/i2c-";
constexpr char kContaminantDetectionPath[] = "-0025/contaminant_detection";
constexpr char kStatusPath[] = "-0025/contaminant_detection_status";
constexpr char kContaminantDetectionPath[] = "i2c-max77759tcpc/contaminant_detection";
constexpr char kStatusPath[] = "i2c-max77759tcpc/contaminant_detection_status";
constexpr char kTypecPath[] = "/sys/class/typec";
constexpr char kDisableContatminantDetection[] = "vendor.usb.contaminantdisable";
@ -176,14 +176,14 @@ Status queryMoistureDetectionStatus(hidl_vec<PortStatus> *currentPortStatus_1_2)
(*currentPortStatus_1_2)[0].supportsEnableContaminantPresenceProtection = false;
getContaminantDetectionNamesHelper(&path);
enabledPath = kI2CPath + path + "/" + path + kContaminantDetectionPath;
enabledPath = kI2CPath + path + "/" + kContaminantDetectionPath;
if (readFile(enabledPath, &enabled)) {
ALOGE("Failed to open moisture_detection_enabled");
return Status::ERROR;
}
if (enabled == "1") {
DetectedPath = kI2CPath + path + "/" + path + kStatusPath;
DetectedPath = kI2CPath + path + "/" + kStatusPath;
if (readFile(DetectedPath, &status)) {
ALOGE("Failed to open moisture_detected");
return Status::ERROR;

View file

@ -7,8 +7,8 @@ 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/10d50000.hsi2c/i2c-5/5-0025/contaminant_detection
chown root system /sys/devices/platform/10d50000.hsi2c/i2c-6/6-0025/contaminant_detection
chown root system /sys/devices/platform/10d50000.hsi2c/i2c-5/i2c-max77759tcpc/contaminant_detection
chown root system /sys/devices/platform/10d50000.hsi2c/i2c-6/i2c-max77759tcpc/contaminant_detection
chown root system /sys/class/udc/11110000.usb/device/b_sess
chown root system /sys/class/udc/11110000.usb/device/id
chown root system /sys/class/udc/11110000.usb/device/usb_data_enabled