meta-digi-arm: Remove the RTC pre/post actions in the suspend script.
These were historically needed for other platforms. Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
This commit is contained in:
parent
a77cd1406d
commit
f9884afc12
|
|
@ -25,18 +25,6 @@ usage() {
|
||||||
\n"
|
\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
suspend_system_time() {
|
|
||||||
if [ "$(echo /sys/class/rtc/rtc*)" != "/sys/class/rtc/rtc*" ]; then
|
|
||||||
hwclock -w
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
resume_system_time() {
|
|
||||||
if [ "$(echo /sys/class/rtc/rtc*)" != "/sys/class/rtc/rtc*" ]; then
|
|
||||||
hwclock -s
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
while getopts "h" c; do
|
while getopts "h" c; do
|
||||||
case "${c}" in
|
case "${c}" in
|
||||||
h) usage; exit;;
|
h) usage; exit;;
|
||||||
|
|
@ -45,14 +33,12 @@ done
|
||||||
|
|
||||||
if [ -f "${syspower}" ]; then
|
if [ -f "${syspower}" ]; then
|
||||||
# Pre-suspend actions
|
# Pre-suspend actions
|
||||||
suspend_system_time
|
|
||||||
|
|
||||||
# Suspend the device
|
# Suspend the device
|
||||||
printf "mem" > ${syspower}
|
printf "mem" > ${syspower}
|
||||||
sleep .5
|
sleep .5
|
||||||
|
|
||||||
# Post-resume actions
|
# Post-resume actions
|
||||||
resume_system_time
|
|
||||||
else
|
else
|
||||||
printf "\n[ERROR] File ${syspower} not found\n\n"
|
printf "\n[ERROR] File ${syspower} not found\n\n"
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue