summaryrefslogtreecommitdiffstats
path: root/openembedded/packages/linux-hotplug/files/soc.agent
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2005-08-31 10:45:47 +0000
committerRichard Purdie <richard@openedhand.com>2005-08-31 10:45:47 +0000
commit4b46c1f6e891b1ddd5968536440b888661fade3e (patch)
treee0ba2c1f56f61b868bf746da5c4feabb25b800b2 /openembedded/packages/linux-hotplug/files/soc.agent
downloadpoky-4b46c1f6e891b1ddd5968536440b888661fade3e.tar.gz
Initial population
git-svn-id: https://svn.o-hand.com/repos/poky@1 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/packages/linux-hotplug/files/soc.agent')
-rw-r--r--openembedded/packages/linux-hotplug/files/soc.agent62
1 files changed, 62 insertions, 0 deletions
diff --git a/openembedded/packages/linux-hotplug/files/soc.agent b/openembedded/packages/linux-hotplug/files/soc.agent
new file mode 100644
index 0000000000..e91246196f
--- /dev/null
+++ b/openembedded/packages/linux-hotplug/files/soc.agent
@@ -0,0 +1,62 @@
1#!/bin/sh
2#
3# SoC hotplug agent for 2.6 kernels
4#
5# ACTION=add
6# SOC_ID=1234
7#
8
9cd /etc/hotplug
10. ./hotplug.functions
11
12MAP_CURRENT=$MODULE_DIR/modules.socmap
13
14#
15# stdin is "modules.socmap" syntax
16# on return, all matching modules were added to $DRIVERS
17#
18soc_map_modules ()
19{
20 while read line
21 do
22 # comments are lines that start with "#" ...
23 # be careful, they still get parsed by bash!
24 case "$line" in
25 \#*) continue ;;
26 esac
27
28 set $line
29
30 module="$1"
31 id="$2"
32
33 if [ "$id" != "0x$SOC_ID" ]; then
34 continue
35 fi
36
37 # It was a match!
38 case " $DRIVERS " in
39 *" $module "* )
40 : already found
41 ;;
42 * )
43 DRIVERS="$module $DRIVERS"
44 ;;
45 esac
46 : drivers $DRIVERS
47 done
48}
49
50case $ACTION in
51
52add)
53
54 load_drivers soc $MAP_CURRENT "$SOC_ID"
55 ;;
56
57*)
58 debug_mesg SoC $ACTION event not supported
59 exit 1
60 ;;
61
62esac