diff options
author | Bill Richardson <wfrichar@chromium.org> | 2014-03-26 16:56:38 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2014-04-01 21:37:32 +0000 |
commit | 9f40d3f90e7373b96256033b3ec7b4b8e5140881 (patch) | |
tree | bb2f4dc8742f869667938f8ee7a2ad4fb9cb38f8 /test/sbs_charging_v2.tasklist | |
parent | 71766a39262b6ed4fec51cba19f10c6bec7e9f19 (diff) | |
download | chrome-ec-9f40d3f90e7373b96256033b3ec7b4b8e5140881.tar.gz |
Add charge_state_v2 algorithm for use by Samus
This is a complete rewrite of the charge_state task used by x86 platforms.
Rather than having a bunch of state-specific functions, each with their own
error handling and special cases, this is organized like so:
Forever:
1. Read everything we can from the battery and charger.
2. Figure out what we'd like to do (including error handling).
3. Allow for customization to override that.
4. Do it.
Things I need to file bugs for are marked with "TODO(wfrichar)". I'll file
the bugs after this CL goes in, so that they'll have something relevant to
refer to.
BUG=chrome-os-partner:20881
BRANCH=ToT
TEST=manual
make buildall -j
Try it on Samus, watch it charge from nearly empty to full, both with and
without fastcharge enabled.
Also undefine CONFIG_BATTERY_PRESENT_CUSTOM, plug and unplug the battery to
be sure the trickle charging logic is correct when it can't tell if the
battery is present.
Change-Id: I3935cd3b87f322eb52178f8a675a886c16b75d58
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/191767
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'test/sbs_charging_v2.tasklist')
-rw-r--r-- | test/sbs_charging_v2.tasklist | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/sbs_charging_v2.tasklist b/test/sbs_charging_v2.tasklist new file mode 100644 index 0000000000..a87856a123 --- /dev/null +++ b/test/sbs_charging_v2.tasklist @@ -0,0 +1,19 @@ +/* Copyright (c) 2014 The Chromium OS Authors. All rights reserved. + * Use of this source code is governed by a BSD-style license that can be + * found in the LICENSE file. + */ + +/** + * List of enabled tasks in the priority order + * + * The first one has the lowest priority. + * + * For each task, use the macro TASK_TEST(n, r, d, s) where : + * 'n' in the name of the task + * 'r' in the main routine of the task + * 'd' in an opaque parameter passed to the routine at startup + * 's' is the stack size in bytes; must be a multiple of 8 + */ +#define CONFIG_TEST_TASK_LIST \ + TASK_TEST(CHARGER, charger_task, NULL, TASK_STACK_SIZE) \ + TASK_TEST(CHIPSET, chipset_task, NULL, TASK_STACK_SIZE) |