udev: rename configure script

This commit is contained in:
Arnaud Ferraris
2021-02-16 23:47:29 +01:00
parent 94cbd03921
commit 7765e6c541
2 changed files with 1 additions and 1 deletions

21
udev/eg25-configure-usb Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/sh
DEVPATH=/sys/$1
USB_ID=
[ -d ${DEVPATH} ] || exit 1
while [ ! "${USB_ID}" ]; do
if [ -f ${DEVPATH}/avoid_reset_quirk ]; then
USB_ID=$(basename ${DEVPATH})
break
fi
DEVPATH=$(dirname ${DEVPATH})
done
# Avoid USB resets
echo "auto" > /sys/bus/usb/devices/${USB_ID}/power/control
echo "3000" > /sys/bus/usb/devices/${USB_ID}/power/autosuspend_delay_ms
echo "enabled" > /sys/bus/usb/devices/${USB_ID}/power/wakeup
echo "1" > /sys/bus/usb/devices/${USB_ID}/avoid_reset_quirk
echo "0" > /sys/bus/usb/devices/${USB_ID}/power/persist