diff options
author | Wai-Hong Tam <waihong@google.com> | 2020-07-15 14:16:14 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-07-21 00:39:46 +0000 |
commit | 0b48d88cc8cf085ece95dc9ebf66b8a07eb72696 (patch) | |
tree | cbfa39cde42ebe43d48c61068b3382da6bcf4aeb /driver/battery/bq27541.c | |
parent | 565fa5f2fd66c8eb64bb8c009a865380029e6666 (diff) | |
download | chrome-ec-0b48d88cc8cf085ece95dc9ebf66b8a07eb72696.tar.gz |
battery: Expose battery_manufacture_date() as API
The newer kernels request this data.
Add the battery_manufacture_date() as a new API.
Checked the TRMs of the following batteries. They don't have any way to
query the manufacture date, so return EC_ERROR_UNIMPLEMENTED.
* bq27541
* bq27621_g1
* max17055
* mm8013
BRANCH=None
BUG=b:160784792
TEST=Hacked to print the manufacture date, on both battery present and not.
Change-Id: I1deefb64f6cc594828d6c10c42fa7107dadd7559
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2300689
Commit-Queue: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Diffstat (limited to 'driver/battery/bq27541.c')
-rw-r--r-- | driver/battery/bq27541.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/driver/battery/bq27541.c b/driver/battery/bq27541.c index b9c80c3b24..868b0215e8 100644 --- a/driver/battery/bq27541.c +++ b/driver/battery/bq27541.c @@ -169,6 +169,11 @@ int battery_serial_number(int *serial) return EC_SUCCESS; } +int battery_manufacture_date(int *year, int *month, int *day) +{ + return EC_ERROR_UNIMPLEMENTED; +} + int battery_design_voltage(int *voltage) { *voltage = battery_get_info()->voltage_normal; |