Merge "Disable USB contaminant detection when the disable flag is true" into udc-d1-dev am: 756902cd89 am: 13c3e00b01 am: 4f4e01b666

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

Change-Id: Ifeb1e7f2f8641c2adc96be5ec600d93ca316c73d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jimmy Hu 2023-05-24 09:34:08 +00:00 committed by Automerger Merge Worker
commit 2c5dd2995c
4 changed files with 21 additions and 0 deletions

View file

@ -34,3 +34,10 @@ license {
"NOTICE",
],
}
sh_binary {
name: "disable_contaminant_detection.sh",
src: "disable_contaminant_detection.sh",
vendor: true,
sub_dir: "hw",
}

View file

@ -195,6 +195,9 @@ on property:sys.usb.config=charger && property:sys.usb.configfs=1
on property:ro.bootmode=usbuwb
setprop persist.vendor.usb.usbradio.config uwb_acm
on property:vendor.usb.contaminantdisable=true
exec /vendor/bin/hw/disable_contaminant_detection.sh
on property:persist.vendor.usb.displayport.enabled=1
write /sys/class/typec/port0/port0.0/mode1/active "yes"

View file

@ -360,6 +360,10 @@ PRODUCT_COPY_FILES += \
device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.persist:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.persist \
device/google/$(TARGET_BOARD_PLATFORM)/conf/fstab.modem:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.modem
# Shell scripts
PRODUCT_PACKAGES += \
disable_contaminant_detection.sh
include device/google/gs-common/insmod/insmod.mk
# Insmod config files

View file

@ -0,0 +1,7 @@
#!/vendor/bin/sh
for f in /sys/devices/platform/10cb0000.hsi2c/i2c-*/*-0025; do
if [ -d $f ]; then
echo 0 > $f/contaminant_detection;
fi
done