Disable USB contaminant detection when the disable flag is true
(ported from 6b1106498e1164f46b9a895ed2258a20a0c7a7b5) Bug: 244658328 Signed-off-by: Kyle Tso <kyletso@google.com> Change-Id: I9d17748d24f3c402deaddb8a9bca89f8ef606056 Merged-In: I9d17748d24f3c402deaddb8a9bca89f8ef606056
This commit is contained in:
parent
bfb57fd23f
commit
2307196bb8
3 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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 += \
|
||||
|
|
7
disable_contaminant_detection.sh
Normal file
7
disable_contaminant_detection.sh
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue