view openmoko/modem-power-ctrl.sh @ 973:7c18eac91457

loadtools: round out support for Intel flash families The three Intel flash families encountered so far in Calypso GSM devices are C3, W30 and W18, sizes from 2 to 8 MiB. Let's support all Intel flash chips from these 3 families across this range of sizes.
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 28 Nov 2023 18:56:40 +0000
parents ace7270e1161
children
line wrap: on
line source

#!/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 .2
		echo 1 > $syspath
		exit 0
		;;
	*)
		echo "usage: $0 on|off|boot" 1>&2
		exit 1
esac