Files
OpenCellular/common
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
..
2014-05-21 20:32:17 +00:00
2013-12-20 05:07:58 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2014-03-06 21:32:57 +00:00
2014-05-21 20:32:17 +00:00
2013-10-25 20:12:49 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2013-12-19 00:12:28 +00:00
2014-05-21 20:32:17 +00:00
2014-03-06 21:33:09 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2014-01-14 09:19:45 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2013-12-05 22:30:58 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2013-12-19 00:12:28 +00:00
2013-06-10 01:48:44 -07:00
2014-05-17 20:14:17 +00:00
2013-12-19 00:12:28 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00
2014-05-21 20:32:17 +00:00