Disallowing draining until bricking
andy at openmoko.com
Fri Jul 18 09:35:34 CEST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Somebody in the thread at some point said:
|>> 2: PMU has LOWBAT concept based on VB+ pin of battery level. But, we
|>> need some considerable juice left in our battery to work around VB_SYS
|>> dip issue on next start. So, better that we monitor it from the kernel
|>> thread via HDQ where possible to learn true "capacity" figure and turn
|>> ourselves OFF if no USB and we reach say 3% capacity. Separately
| PalmOS had a nice solution: at ~10% capacity it would suspend and
| refuse to resume until the bootloader can see that battery is above
| ~20% again. The ~10% was enough for at least three weeks. With modem
| forced off maybe we could reach a couple of days on Neo, that would
| perhaps be enough for non tech users to (almost) never have to witness
| the system boot up.
I think it's a good idea, userspace can take care of that at those kinds
of levels: in the normal case userspace is working as okay as ASU works
and can act and knows how the battery is doing. What we need in the
kernel is the failsafe no-brick aspect that a broken userspace can't
override or countermand, which is really OFF at some low threshold.
When we get kernel-driven periodic wake from suspend to confirm battery
too, the two things can work together to enforce your nice way first and
then the failsafe OFF way in the end.
|>> 4: Stuff like PANIC response needs to time out and go OFF.
| S3C24xx has a watchdog timer for this (not sure if it's enabled in our
| current defconfig). The watchdog timer causes a reset and u-boot will
| know the reset came from the watchdog and can shut down. It is enabled
| through /sys or kernel params.
Good idea... and maybe we should run the watchdog globally anyway on 10
sec period or so. I dunno what 'operational' means for us, but I used
it on AT91RM9200 with a sleepy Ash script instead of a daemon, because
there are plenty of ways a system can be fatally brain damaged but still
run the daemon. The Ash script confirmed that a critical USB memory
stick was still mounted and operational before stroking the watchdog for
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the openmoko-kernel