diff options
author | Aseda Aboagye <aaboagye@google.com> | 2020-08-03 15:22:11 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-08-05 21:59:32 +0000 |
commit | 9a1048e52e7f8595b5ca092a4c2a571514338a3e (patch) | |
tree | 022a3fcb087ccc721d08b7f51fdb2e17e525a386 /include | |
parent | e42d9cb6f88b6174b1ff7c554651f5151e4158f0 (diff) | |
download | chrome-ec-9a1048e52e7f8595b5ca092a4c2a571514338a3e.tar.gz |
OCPC: Add ocpc_init()
This commit adds a ocpc_init() function which will also chain off to a
board specific init function as well. Currently, the init function
sets up the initial resistances. The board specific init functions
may set up charger specific parameters.
BUG=b:147440290
BRANCH=None
TEST=Enable on waddledee, build and flash and verify charging still
works. Verify that initial resistances are seeded.
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: Ia25aff9d2032746f42cbf0f7b6c5707d20362203
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2336173
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/ocpc.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/ocpc.h b/include/ocpc.h index 0e1336873b..a2c4d3a644 100644 --- a/include/ocpc.h +++ b/include/ocpc.h @@ -63,4 +63,19 @@ __overridable void ocpc_get_pid_constants(int *kp, int *kp_div, int *ki, int *ki_div, int *kd, int *kd_div); +/* + ** Set up some initial values for the OCPC data structure. This will call off + * to board_ocpc_init() such that boards can set up any charger flags if needed. + * + * @param ocpc: Pointer to OCPC data + */ +void ocpc_init(struct ocpc_data *ocpc); + +/** + * Board specific OCPC data structure initialization. This can be used to set + * up and charger flags. The default implementation does nothing. + * + * @param ocpc: Pointer to OCPC data + */ +__override_proto void board_ocpc_init(struct ocpc_data *ocpc); #endif /* __CROS_EC_OCPC_H */ |