comparison openmoko/modem-power-ctrl.sh @ 583:2823fd5351f8

openmoko/modem-power-ctrl.sh: replacement for old hard-coded special case
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 03 Feb 2020 01:50:55 +0000
parents
children ace7270e1161
comparison
equal deleted inserted replaced
582:deda54106c0e 583:2823fd5351f8
1 #!/bin/sh
2
3 # The /sys path to the GSM power control node is different
4 # under different Openmoko kernel versions; you need to
5 # uncomment the correct version for your system.
6
7 #syspath=/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on
8 syspath=/sys/bus/platform/devices/gta02-pm-gsm.0/power_on
9
10 case "$1" in
11 on|1)
12 echo 1 > $syspath
13 exit 0
14 ;;
15 off|0)
16 echo 0 > $syspath
17 exit 0
18 ;;
19 boot)
20 echo 0 > $syspath
21 sleep .350
22 echo 1 > $syspath
23 exit 0
24 ;;
25 *)
26 echo "usage: $0 on|off|boot" 1>&2
27 exit 1
28 esac