diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2019-04-30 10:08:45 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-05-01 11:03:00 -0700 |
commit | 70a785ad2ab3b1f855d0eddf6366a10d71c5f77c (patch) | |
tree | 41676c263fa00e40724829914502e54699febe42 /include | |
parent | 15bd8639ef6df248b4474808bd21d80b0c19bac4 (diff) | |
download | chrome-ec-70a785ad2ab3b1f855d0eddf6366a10d71c5f77c.tar.gz |
battery: Consolidate battery_manufacturer_name
Currently, the battery_manufacturer_name API is implemented individually
by each chip.
This patch consolidate the definitions. It also allows a board to
return custom manufacturer names.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
BUG=b/129599895
BRANCH=none
TEST=buildall
Change-Id: Ib0f60c9be71fea31658ab284a915d73341b9145e
Reviewed-on: https://chromium-review.googlesource.com/1590039
Commit-Ready: YH Lin <yueherngl@chromium.org>
Tested-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/battery.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/battery.h b/include/battery.h index e3eec84164..df5aee5990 100644 --- a/include/battery.h +++ b/include/battery.h @@ -303,6 +303,17 @@ int battery_serial_number(int *serial); int battery_manufacturer_name(char *dest, int size); /** + * Read manufacturer name. + * + * This can be overridden to return a chip or board custom string. + * + * @param dest Destination buffer. + * @param size Length of destination buffer in chars. + * @return non-zero if error. + */ +int get_battery_manufacturer_name(char *dest, int size); + +/** * Read device name. * * @param dest Destination buffer. |