[PATCH 0/5] Power supply and resume ordering meddling

Andy Green andy at openmoko.com
Wed Jun 11 00:39:16 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Somebody in the thread at some point said:
|
|
| Andy Green wrote:
|> Somebody in the thread at some point said:
|>
|> | I've noticed something else that looks like it could be an hardware
|> | issue. LEDs are not able to be lit when you are in suspend mode. This
|> | means you can't indicate a charge if you are plugged in and suspended.
|> | I can set this capability in my application, but it isn't default
|> behavior.
|>
|> There shouldn't be a hardware issue with LED state surviving suspend if
|> we wanted it in the LED suspend function.  CPU defines the GPIO will
|> hold its state during suspend.
|>
| Do I have to modify the led class to support this? Is there some
| standard way to export an interface for this? It would be really nice to
| be able to setup the LEDs (at least some of them) so that they stay on
| while in suspend.

Yes it's in the class stuff I think ---->

...

| Yes, but if, for example, I setup an LED to indicate a message is
| waiting or the phone is charging and then I initiate a RAM suspend, then
| the light goes out until I wake from an event.

It comes from this in ./drivers/leds/led-class.c I guess

/**
~ * led_classdev_suspend - suspend an led_classdev.
~ * @led_cdev: the led_classdev to suspend.
~ */
void led_classdev_suspend(struct led_classdev *led_cdev)
{
	led_cdev->flags |= LED_SUSPENDED;
	led_cdev->brightness_set(led_cdev, 0);  <======
}
EXPORT_SYMBOL_GPL(led_classdev_suspend);


If you go around that, the CPU will keep whatever GPIO states you had on
entry to suspend no problem.

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.

- -Andy

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

iEYEARECAAYFAkhPApQACgkQOjLpvpq7dMq3aQCaAkhmTQ6ewG4SxDOsDoQIuMo9
RG8AoJWa2jCzCVKzuKoZ6TlHUUg3jYHA
=oSnW
-----END PGP SIGNATURE-----




More information about the openmoko-kernel mailing list