summaryrefslogtreecommitdiff
path: root/include/fpsensor_state.h
diff options
context:
space:
mode:
authorTom Hughes <tomhughes@chromium.org>2019-06-05 14:28:00 -0700
committerCommit Bot <commit-bot@chromium.org>2019-09-28 17:00:32 +0000
commit3c1215dadc3a279925a17f55bdf0cb8863c41626 (patch)
tree5eee8e879aed7545f7d860119d5867c5455f730f /include/fpsensor_state.h
parent19b8749c0915278171acfd83495d5a73bb359385 (diff)
downloadchrome-ec-3c1215dadc3a279925a17f55bdf0cb8863c41626.tar.gz
fpsensor: Deinit the sensor before clearing the context
The opaque context contains sensor state that we can't nuke from underneath the sensor library. Calling fp_sensor_deinit will release this context and allow us to safely clear the context. BRANCH=none BUG=b:124773209 TEST="fpenroll" followed by "fpclear" in the FP console TEST=On nocturne, in the UI, enroll finger, log out, and log in => then lock and unlock with finger TEST=make buildall -j Change-Id: I3e25bdf7eaaf99f3801547e11a6c524f924f4726 Signed-off-by: Tom Hughes <tomhughes@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1647294 Reviewed-by: Nicolas Norvez <norvez@chromium.org> Commit-Queue: Yicheng Li <yichengli@chromium.org> Tested-by: Yicheng Li <yichengli@chromium.org>
Diffstat (limited to 'include/fpsensor_state.h')
-rw-r--r--include/fpsensor_state.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/fpsensor_state.h b/include/fpsensor_state.h
index 8b5ab6ef0c..76b88d79b8 100644
--- a/include/fpsensor_state.h
+++ b/include/fpsensor_state.h
@@ -78,10 +78,11 @@ void fp_task_simulate(void);
*/
void fp_clear_finger_context(int idx);
-/*
- * Clear all fingerprint templates associated with the current user id.
+/**
+ * Clear all fingerprint templates associated with the current user id and
+ * reset the sensor.
*/
-void fp_clear_context(void);
+void fp_reset_and_clear_context(void);
/*
* Get the next FP event.