diff options
author | Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com> | 2022-04-20 11:06:43 +0800 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-05-13 06:15:03 +0000 |
commit | 7d03da76a7360483a00c499532cac0c3375067c3 (patch) | |
tree | e2326a7f2deae7c1d6952d92ec1df8e1ccb8ee9a /include | |
parent | 917c4d4a4bd31fdd6d2069c68d1fb8ae0a45df7d (diff) | |
download | chrome-ec-7d03da76a7360483a00c499532cac0c3375067c3.tar.gz |
virtual_battery: Support Battery MFG function and manufacture info
Add Battery MFG function and manufacture info (0x70)
BUG=b:228360450
BRANCH=kukui
TEST=make buildall
zmake build -a
Signed-off-by: Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com>
Change-Id: I81c73c468de170dac1ef141514cabbc30bf97536
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3595402
Reviewed-by: Eric Yilun Lin <yllin@google.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/battery_smart.h | 5 | ||||
-rw-r--r-- | include/config.h | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/include/battery_smart.h b/include/battery_smart.h index 9b373f7c8a..dc0679dff0 100644 --- a/include/battery_smart.h +++ b/include/battery_smart.h @@ -56,9 +56,14 @@ #define SB_DEVICE_NAME 0x21 #define SB_DEVICE_CHEMISTRY 0x22 #define SB_MANUFACTURER_DATA 0x23 +#define SB_OPTIONAL_MFG_FUNC1 0x3C +#define SB_OPTIONAL_MFG_FUNC2 0x3D +#define SB_OPTIONAL_MFG_FUNC3 0x3E +#define SB_OPTIONAL_MFG_FUNC4 0x3F /* Extension of smart battery spec, may not be supported on all platforms */ #define SB_PACK_STATUS 0x43 #define SB_ALT_MANUFACTURER_ACCESS 0x44 +#define SB_MANUFACTURE_INFO 0x70 /* Battery mode */ #define MODE_INTERNAL_CHARGE_CONTROLLER BIT(0) diff --git a/include/config.h b/include/config.h index 478e6dc708..100cd12020 100644 --- a/include/config.h +++ b/include/config.h @@ -2633,6 +2633,12 @@ #undef CONFIG_I2C_VIRTUAL_BATTERY /* + * Define this configuration to support smart battery MFG function + * for virtual battery. + */ +#undef CONFIG_SMART_BATTERY_OPTIONAL_MFG_FUNC + +/* * Define this option if an i2c bus may be unpowered at a certain point during * runtime. An example could be, a sensor bus which is not needed in lower * power states so the power rail for those sensors is completely disabled. |