[PATCH 0/5] Power supply / LEDs in suspend

Andy Green andy at openmoko.com
Wed Jun 11 10:25:51 CEST 2008

Hash: SHA1

Somebody in the thread at some point said:

|> But there is an argument that sticking LEDs on in suspend is not good,
|> it can violate user expectation about battery life while in suspend (ie,
|> halve it).  And currently entry to suspend is a user action, he can
|> notice LED lit at that time; again currently by definition the
|> notificaton cannot be started to be displayed during the time the CPU is
|> suspended either... but it can be shown quickly on wake when the user is
|> definitely attending to it.
| In my application, suspend is not a user action. It occurs when there is
| no event within a specified period of time. Just like any modern screen

Well I wholeheartedly approve of this stern powersaving attitude, it's
clearly the way.

| saver. I didn't realize that LEDs were so power hungry. But I would like

It's not that the LEDs are so bad but that the suspend current with GSM
up is pretty low already, IIRC 7 - 10mA @ VB average.  LEDs eat 5 - 20mA
@ ~2V depending on the type.  And because of the logic above, an LED is
going to either be off the whole duration of suspend or on the whole

| to essentially prevent them from suspending when I am plugged into

I guess the way for this would be to extend the led class to expose a
/sys attribute per LED that lets you defeat suspend turnoff (defaulting
to current situation) and take care of setting it in userspace.  I don't
mind carrying it as a local patch, as upstream may or may not treat the
idea kindly.

| power. How about the timers that they are connected to for a timed
| trigger? I'd assume it is an on or off deal when in suspend and no
| blinking.

Yes, in suspend the CPU core is literally unpowered and the PLLs are
down; the GPIO registers are held just as dumb registers.  All the
peripherals are unclocked or unpowered... in this way we get the very
best power behaviour.  Vast bulk of that 7 - 10mA is going in the GSM
section because that's up, our suspend current with GSM off was in 1 -
2mA range.

- -Andy
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org


More information about the openmoko-kernel mailing list