diff options
author | YH Lin <yueherngl@google.com> | 2022-06-22 00:22:37 +0000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-06 17:00:00 +0000 |
commit | 2b020b9b1a7578bf382163801aa0f65eb4edb343 (patch) | |
tree | a82e131fe5b0fc63e70d123b56242c1986f87d97 /common/cbi.c | |
parent | b6058211c0259083cb1bdeb731d580e8ae760996 (diff) | |
download | chrome-ec-2b020b9b1a7578bf382163801aa0f65eb4edb343.tar.gz |
ec: add cbi data tag/field for factory_calibration_data
Add a CBI factory_calibration_data tag to carry 32 bit data in the CBI
as well as the accessor for this data.
BUG=b:236048046
TEST=None
BRANCH=None
Signed-off-by: YH Lin <yueherngl@chromium.org>
Change-Id: Iab31422b8a6d2e25e238aa0c6c72a297b6663e09
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3716800
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'common/cbi.c')
-rw-r--r-- | common/cbi.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/common/cbi.c b/common/cbi.c index 678f429530..f878e4492e 100644 --- a/common/cbi.c +++ b/common/cbi.c @@ -311,6 +311,14 @@ int cbi_get_rework_id(uint64_t *id) return cbi_get_board_info(CBI_TAG_REWORK_ID, (uint8_t *)id, &size); } +int cbi_get_factory_calibration_data(uint32_t *calibration_data) +{ + uint8_t size = sizeof(*calibration_data); + + return cbi_get_board_info(CBI_TAG_FACTORY_CALIBRATION_DATA, + (uint8_t *)calibration_data, &size); +} + static enum ec_status hc_cbi_get(struct host_cmd_handler_args *args) { const struct __ec_align4 ec_params_get_cbi *p = args->params; |