summaryrefslogtreecommitdiff
path: root/include/fpsensor.h
Commit message (Collapse)AuthorAgeFilesLines
* include/fpsensor: Use doxygen to describe functionsTom Hughes2022-04-251-54/+90
| | | | | | | | | | | | | | | | The function comments for the fingerprint sensor were using a pseudo-doxygen format. This commit updates it to better follow the doxygen format. BRANCH=none BUG=b:226672013 TEST=./util/compare_build.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I743b60dd7bcd922ae4fe0ef434ef389e5c4170de Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3602219 Reviewed-by: Andrea Grandi <agrandi@google.com>
* include: Update comments for fp_capture_typeTom Hughes2022-04-221-3/+10
| | | | | | | | | | | | BRANCH=none BUG=b:226672013 TEST=./util/compare_build.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I5d0fcf79c49087929875845d23dd73ae919ce8b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3602218 Reviewed-by: Andrea Grandi <agrandi@google.com>
* Revert "fpsensor: Support building firmware that works for both sensors"Tom Hughes2021-04-071-147/+115
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ac08c9d1dbc9f587df3ee6b15d58c0203f7e356e. Reason for revert: Breaks public build Original change's description: > fpsensor: Support building firmware that works for both sensors > > This is a refactoring to allow building FPMCU firmware that works for > one FPC sensor and one ELAN sensor. > > 1. When both drivers implement our common functions, e.g. fp_sensor_init(), > rename them to fp_sensor_init_fpc() and fp_sensor_init_elan(). > 2. There are a few functions implemented not in FPC driver but in FPC > private library, e.g. fp_sensor_finger_status(). I kept this as-is for > FPC but renamed the one in ELAN driver to fp_sensor_finger_status_elan() > 3. If building for ELAN, need to hardcode elan=1 in hatch_fp/board.c > because the sensor type GPIO always says FPC. > > BRANCH=none > BUG=b:175158241 > TEST=make run-fpsensor; make run-fpsensor_status; > make run-fpsensor_crypto > TEST=make -j BOARD=dartmonkey > TEST=add CONFIG_FP_SENSOR_ELAN515 to board/hatch_fp/board.h; > make -j BOARD=bloonchipper > Firmware binary fully works on Dragonair (FPC) and Voema (ELAN) > TEST=run device tests with http://crrev/c/2750547 and > http://crrev/i/3654297 on Dragonclaw, all pass > > Change-Id: I789090dbdfe35ac6aefd6a629fa4c7bde89dc437 > Signed-off-by: Yicheng Li <yichengli@chromium.org> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2727971 > Reviewed-by: Tom Hughes <tomhughes@chromium.org> > Commit-Queue: Tom Hughes <tomhughes@chromium.org> Bug: b:175158241, b:184616069 Change-Id: I2a02a6eefc316e7e13aa188f1ae16672dce2babd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2809521 Auto-Submit: Tom Hughes <tomhughes@chromium.org> Tested-by: Tom Hughes <tomhughes@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: caveh jalali <caveh@chromium.org>
* fpsensor: Support building firmware that works for both sensorsYicheng Li2021-04-021-115/+147
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a refactoring to allow building FPMCU firmware that works for one FPC sensor and one ELAN sensor. 1. When both drivers implement our common functions, e.g. fp_sensor_init(), rename them to fp_sensor_init_fpc() and fp_sensor_init_elan(). 2. There are a few functions implemented not in FPC driver but in FPC private library, e.g. fp_sensor_finger_status(). I kept this as-is for FPC but renamed the one in ELAN driver to fp_sensor_finger_status_elan() 3. If building for ELAN, need to hardcode elan=1 in hatch_fp/board.c because the sensor type GPIO always says FPC. BRANCH=none BUG=b:175158241 TEST=make run-fpsensor; make run-fpsensor_status; make run-fpsensor_crypto TEST=make -j BOARD=dartmonkey TEST=add CONFIG_FP_SENSOR_ELAN515 to board/hatch_fp/board.h; make -j BOARD=bloonchipper Firmware binary fully works on Dragonair (FPC) and Voema (ELAN) TEST=run device tests with http://crrev/c/2750547 and http://crrev/i/3654297 on Dragonclaw, all pass Change-Id: I789090dbdfe35ac6aefd6a629fa4c7bde89dc437 Signed-off-by: Yicheng Li <yichengli@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2727971 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Tom Hughes <tomhughes@chromium.org>
* driver/fingerprint: Add a common sensor maintenance functionTom Hughes2020-08-061-0/+11
| | | | | | | | | | | | | | | | Add a new console command "fpmaintenance" for testing. BRANCH=none BUG=b:76037094 TEST=With dragonclaw v0.2 connected to Segger J-Trace and servo micro: ./util/flash_jlink.py On FP console: > fpmaintenance Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I7125f8783d3dd7e815612d20742c9d949d00ba71 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2323709 Reviewed-by: Yicheng Li <yichengli@chromium.org>
* fpsensor: Deinit the sensor before clearing the contextTom Hughes2019-09-281-0/+3
| | | | | | | | | | | | | | | | | | | | 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>
* Fix typo and clarify doc in fpsensor.h and gpio.wrapCraig Hesling2019-08-071-1/+1
| | | | | | | | | | | | | | This also brings some minor Doxygen formatting to gpio.wrap. BRANCH=none BUG=chromium:991365 TEST=make buildall -j Change-Id: Id6d85263b6ac472b0961240ebb266dd22591d68b Signed-off-by: Craig Hesling <hesling@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1685772 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* fpsensor: export matched finger indexVincent Palatin2018-05-091-1/+2
| | | | | | | | | | | | | | | | | | | | | Update the fingerprint match event to include the index of the template which matched. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=poppy BUG=b:77516790 TEST=on ZerbleBarn, enroll 5 fingers and do matching from the console, see the proper finger index in the trace. TEST=on Meowth, check unmodified biod still works for match with the updated MCU firmware. CQ-DEPEND=CL:*621808 Change-Id: I5be77ba65ce232989606274aba9a6c20841d533c Reviewed-on: https://chromium-review.googlesource.com/1047267 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Nicolas Norvez <norvez@chromium.org>
* fpsensor: add enrollment and matching interfaceVincent Palatin2018-03-201-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | Add the state machine and the interfacing to the enrollment and matching algorithm providing by the private driver part. Implement the host commands interface for it (based on MKBP event) along with the console debug commands to exercise it. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=b:72360575 TEST=On ZerbleBarn console, use 'fpenroll' then 'fpmatch' for several fingers. TEST=With ZerbleBarn and a servo-v2, retrieve and upload templates with 'ectool_servo fptemplate'. TEST=On Meowth, exercise with the prototype of biod CrosFpBiometricsManager. CQ-DEPEND=CL:*555078 Change-Id: I10b0d76d3faa898a682cf9a2eb7fc7e212b0c20c Reviewed-on: https://chromium-review.googlesource.com/886401 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* fpsensor: update interfaceVincent Palatin2018-01-231-0/+9
| | | | | | | | | | | | | | | | | | | | | Update the FP MCU interface to include a few convenient diagnostics functions for factory testing. It's mostly backward compatible, but overall this interface never shipped in anything, so not a big deal regardless. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=b:71986991 TEST=ectool --name=cros_fp fpinfo && ectool --name=cros_fp fpcheckpixels CQ-DEPEND=CL:*546799 Change-Id: Ic641f891ace02d79af9339cf6cb59a2960e506a7 Reviewed-on: https://chromium-review.googlesource.com/873924 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
* eve_fp: update fingerprint architectureVincent Palatin2017-12-061-0/+87
split the common FP sensor code and use the updated private driver. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BRANCH=none BUG=b:69460856 TEST=do a finger capture on Eve EVT. CQ-DEPEND=CL:*520759 Change-Id: I8b46762218eed0773a4c49a02c2ee6c3966cfa60 Reviewed-on: https://chromium-review.googlesource.com/806166 Commit-Ready: Vincent Palatin <vpalatin@chromium.org> Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>