aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/i2c/files/i2c.init
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/i2c/files/i2c.init')
-rwxr-xr-xrecipes/i2c/files/i2c.init37
1 files changed, 37 insertions, 0 deletions
diff --git a/recipes/i2c/files/i2c.init b/recipes/i2c/files/i2c.init
new file mode 100755
index 0000000000..957ce68c7b
--- /dev/null
+++ b/recipes/i2c/files/i2c.init
@@ -0,0 +1,37 @@
+#!/bin/sh
+#
+# Start i2c support
+#
+
+start() {
+ echo "Starting i2c..."
+
+ /sbin/modprobe i2c-pxa
+ /sbin/modprobe i2c-dev
+}
+stop() {
+ echo "Stopping i2c..."
+
+}
+restart() {
+ stop
+ start
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ restart
+ ;;
+ *)
+ echo $"Usage: $0 {start|stop|restart}"
+ exit 1
+esac
+
+exit $?
+