From: Michael Mrozek Date: Fri, 27 Apr 2012 00:00:15 +0000 (+0200) Subject: op_power: Pandora does not go into suspend when charger is connected, instead it... X-Git-Tag: sz_beta4~11 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68cb10c686ee80bbb405955351aa33bc9888b8d8;p=openpandora.oe.git op_power: Pandora does not go into suspend when charger is connected, instead it goes into low-power mode --- diff --git a/recipes/pandora-system/pandora-scripts/op_power.sh b/recipes/pandora-system/pandora-scripts/op_power.sh index bb5e715..e5b5e61 100644 --- a/recipes/pandora-system/pandora-scripts/op_power.sh +++ b/recipes/pandora-system/pandora-scripts/op_power.sh @@ -126,6 +126,13 @@ suspend_real() { return 1 fi + current_now="$(cat /sys/class/power_supply/bq27500-0/current_now)" + + if [ $current_now -gt 0 ]; then + return 1 + #don't suspend while unit is charging + fi + # can't suspend while SGX is in use due to bugs # (prevents low power states and potential lockup) if lsof -t /dev/pvrsrvkm > /dev/null; then