Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mod/hakchi/rootfs/etc/init.d/S78clvcon')
-rwxr-xr-xmod/hakchi/rootfs/etc/init.d/S78clvcon47
1 files changed, 47 insertions, 0 deletions
diff --git a/mod/hakchi/rootfs/etc/init.d/S78clvcon b/mod/hakchi/rootfs/etc/init.d/S78clvcon
new file mode 100755
index 0000000..9b47abc
--- /dev/null
+++ b/mod/hakchi/rootfs/etc/init.d/S78clvcon
@@ -0,0 +1,47 @@
+#!/bin/sh
+
+CLV_BOARD_NAME=$(cat /etc/clover/boardtype)
+MODULE="clvcon"
+[ -f "/lib/modules/$(uname -r)/extra/$MODULE.ko" ] || MODULE="clovercon"
+
+start()
+{
+ echo "$MODULE: starting driver"
+ case "${CLV_BOARD_NAME}" in
+ fp)
+ # inverted c1/c2 detect lines
+ MODULE_PARAMS="2,195,1,194"
+ ;;
+ ep|dp-nes|dp-shvc)
+ # regular setup w/ detect lines
+ MODULE_PARAMS="1,195,2,194"
+ ;;
+ dp-hvc)
+ # no detect lines
+ MODULE_PARAMS="1,-1,2,-1"
+ ;;
+ esac
+ modprobe "$MODULE" module_params=$MODULE_PARAMS
+}
+
+stop()
+{
+ echo "$MODULE: stopping driver"
+ modprobe -r "$MODULE"
+}
+
+case "$1" in
+start)
+ start
+;;
+stop)
+ stop
+;;
+restart)
+ stop
+ start
+;;
+*)
+ echo "$MODULE: Please use start, stop, or restart."
+ exit 1
+esac