device_google_gs201/disable_contaminant_detection.sh
Kyle Tso 82d3ac1789 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
2022-09-29 03:10:51 +00:00

7 lines
161 B
Bash

#!/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