FreeCalypso > hg > freecalypso-tools
changeset 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 | deda54106c0e |
children | ace7270e1161 |
files | openmoko/modem-power-ctrl.sh |
diffstat | 1 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/openmoko/modem-power-ctrl.sh Mon Feb 03 01:50:55 2020 +0000 @@ -0,0 +1,28 @@ +#!/bin/sh + +# The /sys path to the GSM power control node is different +# under different Openmoko kernel versions; you need to +# uncomment the correct version for your system. + +#syspath=/sys/bus/platform/devices/neo1973-pm-gsm.0/power_on +syspath=/sys/bus/platform/devices/gta02-pm-gsm.0/power_on + +case "$1" in + on|1) + echo 1 > $syspath + exit 0 + ;; + off|0) + echo 0 > $syspath + exit 0 + ;; + boot) + echo 0 > $syspath + sleep .350 + echo 1 > $syspath + exit 0 + ;; + *) + echo "usage: $0 on|off|boot" 1>&2 + exit 1 +esac