Disable USB contaminant detection when the disable flag is true am: 2307196bb8

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

Change-Id: I42fa6e054ab104695c0bacdcbc81c4673ef503bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Kyle Tso 2022-09-30 09:04:31 +00:00 committed by Automerger Merge Worker
commit 76760b26fd
3 changed files with 11 additions and 0 deletions

View file

@ -194,3 +194,6 @@ 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

View file

@ -313,6 +313,7 @@ PRODUCT_COPY_FILES += \
# Shell scripts
PRODUCT_COPY_FILES += \
device/google/gs201/init.insmod.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.insmod.sh \
device/google/gs201/disable_contaminant_detection.sh:$(TARGET_COPY_OUT_VENDOR)/bin/hw/disable_contaminant_detection.sh
# insmod files
PRODUCT_COPY_FILES += \

View file

@ -0,0 +1,7 @@
#!/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