diff options
author | Nicolas Norvez <norvez@chromium.org> | 2018-09-30 16:12:04 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2018-12-08 02:41:04 +0000 |
commit | 37398a91eb11790dc6f6738b6bf1d620582966d7 (patch) | |
tree | 397fd9df146d9f3c24c5a90642f0da84d4acb36e | |
parent | 6379d291250c270117f0a680f3bfe287621997f0 (diff) | |
download | chrome-ec-37398a91eb11790dc6f6738b6bf1d620582966d7.tar.gz |
fpsensor: FP_INFO reports the template version
Add a field to the ec_response_fp_info structure to report the version
of the template format supported by the hardware.
We'd normally uprev the structure version, but given there are only 2
clients of that API (ectool and biod), we'll rather synchronise the
submission of the CLs to avoid unnecessary complexity.
BRANCH=nocturne
BUG=b:116979455
TEST=ectool --name=cros_fp fpinfo
TEST=start biod, log shows the format version
Change-Id: Ibbf2a3603d4f28c7550523f785aeb7fb740ac9ea
Signed-off-by: Nicolas Norvez <norvez@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1252459
Reviewed-by: Prashant Malani <pmalani@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/1364322
Reviewed-by: YH Lin <yueherngl@chromium.org>
Commit-Queue: YH Lin <yueherngl@chromium.org>
Tested-by: YH Lin <yueherngl@chromium.org>
-rw-r--r-- | include/ec_commands.h | 1 | ||||
-rw-r--r-- | util/ectool.c | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/include/ec_commands.h b/include/ec_commands.h index e94b0c28d5..a5aad9f3bc 100644 --- a/include/ec_commands.h +++ b/include/ec_commands.h @@ -4984,6 +4984,7 @@ struct __ec_align4 ec_response_fp_info { uint16_t template_max; /* maximum number of fingers/templates */ uint16_t template_valid; /* number of valid fingers/templates */ uint32_t template_dirty; /* bitmap of templates with MCU side changes */ + uint32_t template_version; /* version of the template format */ }; /* Get the last captured finger frame or a template content */ diff --git a/util/ectool.c b/util/ectool.c index 1baff35ad1..7821f3fff2 100644 --- a/util/ectool.c +++ b/util/ectool.c @@ -1395,9 +1395,10 @@ int cmd_fp_info(int argc, char *argv[]) } if (cmdver == 1) { - printf("Templates: size %d count %d/%d dirty bitmap %x\n", - r.template_size, r.template_valid, r.template_max, - r.template_dirty); + printf("Templates: version %d size %d count %d/%d" + " dirty bitmap %x\n", + r.template_version, r.template_size, r.template_valid, + r.template_max, r.template_dirty); } return 0; |