summaryrefslogtreecommitdiff
path: root/Documentation/firmware_class/hotplug-script
blob: 1990130f2ab1bcd7706d3365e18d974bc1e044d2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh

# Simple hotplug script sample:
# 
# Both $DEVPATH and $FIRMWARE are already provided in the environment.

HOTPLUG_FW_DIR=/usr/lib/hotplug/firmware/

echo 1 > /sys/$DEVPATH/loading
cat $HOTPLUG_FW_DIR/$FIRMWARE > /sys/$DEVPATH/data
echo 0 > /sys/$DEVPATH/loading

# To cancel the load in case of error:
#
#	echo -1 > /sys/$DEVPATH/loading
#