From 68cb10c686ee80bbb405955351aa33bc9888b8d8 Mon Sep 17 00:00:00 2001 From: Michael Mrozek Date: Fri, 27 Apr 2012 02:00:15 +0200 Subject: [PATCH] op_power: Pandora does not go into suspend when charger is connected, instead it goes into low-power mode --- recipes/pandora-system/pandora-scripts/op_power.sh | 7 +++++++ 1 file changed, 7 insertions(+) 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 -- 2.39.2