[rb532] refresh kernel patches
[openwrt.git] / package / mmc_over_gpio / files / mmc_over_gpio.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2008 OpenWrt.org
3 START=90
4
5 SYSFS="/sys"
6 SYSFS_DRIVERDIR="$SYSFS/bus/platform/drivers/spi-gpio-mmc"
7
8 # add_device(name, DI_pin, DO_pin, CLK_pin, CS_pin, mode)
9 add_device() {
10 echo -n "$1" "$2","$3","$4","$5" "$6" > $SYSFS_DRIVERDIR/add
11 }
12
13 # remove_device(name)
14 remove_device() {
15 echo -n "$1" > $SYSFS_DRIVERDIR/remove
16 }
17
18 start() {
19 #FIXME we should use a config file, but I dunno how that parser works.
20 add_device "default" 5 4 3 7 0
21 }
22
23 stop() {
24 remove_device "default"
25 }
This page took 0.039209 seconds and 5 git commands to generate.