Alec Berg f6cff1fa6b samus: make sure EC sends battery percentage to PD on change
Make sure the EC sends the battery state of charge to the PD every
time it changes.

BUG=none
BRANCH=samus
TEST=create command to fake battery percentage in
driver/battery/smart.c:

static int cmd_battfake(int argc, char **argv)
{
       char *e;
       if (argc > 1)
               batt_fake = strtoi(argv[1], &e, 0);

       return EC_SUCCESS;
}
DECLARE_CONSOLE_COMMAND(battfake, cmd_battfake, NULL, "", NULL);

and in battery_get_params():
       if (batt_cap > -1)
               batt_new.remaining_capacity = batt_cap;

On samus use battfake command to change battery percentage back and
forth every few seconds for minutes and make sure the PD receives
host command 0x100 and that it is still happy.

Change-Id: Ic69ab2af900fa2a38e3d2f6562675684487f556e
Signed-off-by: Alec Berg <alecaberg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/252350
Reviewed-by: Shawn N <shawnn@chromium.org>
2015-02-25 03:32:50 +00:00
2015-02-18 19:30:59 +00:00
2015-02-24 03:07:59 +00:00
2015-02-24 03:07:59 +00:00
2014-03-31 22:45:09 +00:00
2012-05-11 09:11:52 -07:00
2015-01-08 23:55:58 +00:00
2015-02-24 03:07:59 +00:00
2014-04-02 19:58:53 +00:00
2014-05-15 05:20:14 +00:00

For an overview of the Embedded Controller firmware, refer to

http://www.chromium.org/chromium-os/2014-firmware-summit
Description
No description provided
Readme 1.4 GiB
Languages
C 64.7%
Lasso 20.7%
ASL 3.6%
JavaScript 3.2%
C# 2.9%
Other 4.6%