summaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen3-adas/recipes-bsp/ti-bt/files/uim-sysfs
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2017-12-19 15:07:39 -0500
committerTom Rini <trini@konsulko.com>2017-12-19 15:07:39 -0500
commit9ae3b81724f87dcc1f5cbd618c472e0cf79b2791 (patch)
treed3d1e6ac479ba64a78dcf16e521898a44ed08878 /meta-rcar-gen3-adas/recipes-bsp/ti-bt/files/uim-sysfs
parent592c4aca65cc41ea9e5757084ae1d488d2bbd8b0 (diff)
parenteb675727a6bfdee2ba7dd36644403163f9d905e2 (diff)
Merge branch 'pyro' into eel
Diffstat (limited to 'meta-rcar-gen3-adas/recipes-bsp/ti-bt/files/uim-sysfs')
-rw-r--r--meta-rcar-gen3-adas/recipes-bsp/ti-bt/files/uim-sysfs36
1 files changed, 36 insertions, 0 deletions
diff --git a/meta-rcar-gen3-adas/recipes-bsp/ti-bt/files/uim-sysfs b/meta-rcar-gen3-adas/recipes-bsp/ti-bt/files/uim-sysfs
new file mode 100644
index 0000000..93c2cac
--- /dev/null
+++ b/meta-rcar-gen3-adas/recipes-bsp/ti-bt/files/uim-sysfs
@@ -0,0 +1,36 @@
+#! /bin/sh
+
+uim="/usr/bin/uim"
+test -x "$uim" || exit 0
+
+case "$1" in
+ start)
+ echo -n "Starting uim-sysfs daemon"
+ modprobe st_drv
+ NODE=`cd /sys; find . | grep kim | grep install`
+ if [ $NODE ]
+ then
+ echo UIM SYSFS Node Found at /sys/$NODE
+ else
+ echo UIM SYSFS Node Not Found
+ rmmod st_drv
+ exit 0
+ fi
+ uim_args="-f `dirname /sys/$NODE`"
+ start-stop-daemon --start --quiet --pidfile /var/run/uim.pid --make-pidfile --exec $uim -- $uim_args &
+ modprobe btwilink
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping uim-sysfs daemon"
+ start-stop-daemon --stop --quiet --pidfile /var/run/uim.pid
+ rmmod btwilink
+ rmmod st_drv
+ echo "."
+ ;;
+ *)
+ echo "Usage: /etc/init.d/uim-sysfs {start|stop}"
+ exit 1
+esac
+
+exit 0