It is useful to be able to see the current AP power state, and x86
has a command for this. Add one for gaia.
BUG=chrome-os-partner:11427
TEST=manual
(start with power off)
> powerinfo
off
(press power button)
> [batt] state idle -> pre-charging
AP running ...
Power button released
Setting pwron timer 10038870
powerinfo
on
> Releasing pwron
(after kernel boots, make device go into suspend by typing this at
kernel command line:
type echo mem > /sys/power/state)
> powerinfo
suspend
Change-Id: I3244b3a7fd0b6dd689f3470fb97ffe5a72c8d8f9
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/27653
Reviewed-by: David Hendricks <dhendrix@chromium.org>