Permalink
Find file
efb41e2 May 12, 2011
executable file 30 lines (23 sloc) 713 Bytes
#!/bin/sh
# run me as root
# first unbind them all
for dev in `ls /sys/bus/hid/drivers/generic-usb/ | egrep '046D:(C21C|C222|C229|C22B)'`
do echo -n $dev > /sys/bus/hid/drivers/generic-usb/unbind
done
# now bind to correct module
for dev in `ls /sys/bus/hid/devices/ | egrep '046D:C21C'`
do
echo -n $dev > /sys/bus/hid/drivers/hid-g13/bind
done
for dev in `ls /sys/bus/hid/devices/ | egrep '046D:C222'`
do
echo -n $dev > /sys/bus/hid/drivers/hid-g15/bind
done
for dev in `ls /sys/bus/hid/devices/ | egrep '046D:C229'`
do
echo -n $dev > /sys/bus/hid/drivers/hid-g19/bind
done
for dev in `ls /sys/bus/hid/devices/ | egrep '046D:C22B'`
do
echo -n $dev > /sys/bus/hid/drivers/hid-g110/bind
done