From fad8aa3c2a4a691035ffbbb58bc3288d229fd353 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sat, 12 Jun 2010 21:07:42 +0000 Subject: [PATCH] Prevent deep sleep on the Openmoko --- src/plugins/openmoko.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/plugins/openmoko.c b/src/plugins/openmoko.c index b622208..75da525 100644 --- a/src/plugins/openmoko.c +++ b/src/plugins/openmoko.c @@ -13,8 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ /* TODO: - * - implement notification light - * - prevent deep sleep */ + * - implement notification lights */ @@ -110,12 +109,12 @@ static int _openmoko_event(PhonePlugin * plugin, PhoneEvent event, ...) case PHONE_EVENT_VIBRATOR_ON: _event_vibrator(plugin, TRUE); break; - /* not relevant */ - case PHONE_EVENT_SIM_VALID: /* FIXME prevent deep sleep? */ - case PHONE_EVENT_SMS_RECEIVED: - case PHONE_EVENT_SMS_RECEIVING: - case PHONE_EVENT_SMS_SENDING: - case PHONE_EVENT_SMS_SENT: + case PHONE_EVENT_SIM_VALID: + /* prevent deep sleep */ + plugin->helper->queue(plugin->helper->phone, + "AT%SLEEP=2"); + break; + default: /* not relevant */ break; } return 0;