Files
OpenCellular/include
Dave Parker efd3a8925e Add 'at-shutdown' option to batterycutoff host command
If at-shutdown is specified, the battery is cut off
1 seconds after the host has shutdown.

BUG=chrome-os-partner:29292,chrome-os-partner:28887
BRANCH=tot,nyan
TEST=Run batterycutoff ectool command and cutoff console
command with and without 'at-shutdown' option. Verify
the battery is cut off immediately without the option
specified and 1 seconds after shutdown with. View the
console log to see the deferred cutoff occur.

The following tests are verified on big.

console:
  cutoff, AC on: system is off after removing AC.
  cutoff, AC off: system is off immediately.
  at-shutdown, AC on: system is off after "power off" and removing AC.
  at-shutdown, AC off: system is off after "power off".
ectool:
  batterycutoff, AC on: system is off after removing AC.
  batterycutoff, AC off: system is off immediately.
  at-shutdown, AC on: battery is cut off after 1s of shutdown.
                      system is off right after removing AC power.
  at-shutdown, AC off: system is off after 1s of shutdown.
      [84.058416 power state 3 = S0, in 0x0000]
      [84.058803 power lost input; wanted 0x0001, got 0x0000]
      [84.059120 power off 3]
      [84.072148 Cutting off battery in 1 second(s)]
      [84.123896 power shutdown complete]
      [84.128790 power state 7 = S0->S3, in 0x0002]
      [84.139694 power state 2 = S3, in 0x0002]
      [84.150857 power state 8 = S3->S5, in 0x0002]
      [84.166975 power state 1 = S5, in 0x0002]
      [84.177972 power state 1 = S5, in 0x0002]
      [85.080012 Battery cut off succeeded.]

Change-Id: Id4bacf79ad3add885260655f80cb8127bafe1ad6
Signed-off-by: Dave Parker <dparker@google.com>
Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/203694
Reviewed-by: Vic Yang <victoryang@chromium.org>
2014-06-15 01:45:21 +00:00
..
2013-12-17 21:27:53 +00:00
2013-04-05 14:28:42 -07:00
2014-05-21 20:32:17 +00:00
2013-09-10 23:46:07 +00:00
2014-02-08 00:14:48 +00:00
2013-10-25 20:12:49 +00:00
2012-10-26 09:49:38 -07:00
2013-06-26 09:08:23 -07:00
2013-10-21 23:59:38 +00:00
2013-06-18 10:31:09 -07:00
2013-10-30 23:10:13 +00:00
2013-08-07 12:43:48 -07:00
2011-12-07 19:10:02 +00:00
2014-04-12 01:45:47 +00:00
2012-10-25 14:12:11 -07:00
2013-12-05 22:30:58 +00:00
2014-03-06 23:14:07 +00:00
2012-10-25 14:12:10 -07:00
2013-10-30 23:10:10 +00:00
2014-05-17 20:14:17 +00:00
2012-10-25 17:03:44 -07:00
2012-08-09 17:40:37 -07:00
2014-01-06 12:40:45 +00:00
2014-03-01 20:15:59 +00:00
2013-11-21 00:09:09 +00:00
2013-10-21 23:59:38 +00:00
2014-01-15 04:52:40 +00:00