summaryrefslogtreecommitdiff
path: root/board/hatch_fp/fpsensor_detect_rw.c
Commit message (Collapse)AuthorAgeFilesLines
* hatch_fp/board_rw: Set DIVIDER_HIGHSIDE to 1 during board initPatryk Duda2021-07-261-1/+5
| | | | | | | | | | | | | | | | | | | | | On dragonclaw, setting GPIO_DIVIDER_HIGHSIDE to 1 is necessary to enable communication with FP sensor. Until now it was enabled during fp_sensor_init() which was called from fp_task() only in private build (when HAVE_FP_PRIVATE_DRIVER is defined). This was causing problems with fpsensor_hw hardware unittest, which is public build. The problem was solved by enabling GPIO_DIVIDER_HIGHSIDE in configure_fp_sensor_spi(). This approach also required to change get_fp_sensor_type() function to leave GPIO pin enabled. BUG=b:170432597 BRANCH=none TEST=./test/run_device_tests.py --board bloonchipper --tests fpsensor_hw Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: I9cf50ef1377da2dec57d73f9e1374928da86481d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3034857 Reviewed-by: Craig Hesling <hesling@chromium.org>
* bloonchipper: Refactor GPIOs to keep RO minimalTom Hughes2021-02-121-0/+34
We want the amount of code and number of things defined in RO to be as minimal as possible since RO is frozen forever. By keeping RO minimal, we can reduce surface area for attacks and also confusion when GPIOs are removed or renamed. The fingerprint-related code only runs in RW, so move all fingerprint-related GPIOs and associated code into separate files that are only included in RW. BRANCH=none BUG=b:178746753 TEST=On dragonclaw v0.2 with servo micro and jtrace, verify sensor ID shows on console TEST=On dragonair, test fingerprint enroll and unlock TEST=On morphius, test fingerprint enroll and unlock Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ia6791666b57ed9be81230d8a5f77d874f56da5a4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2673909 Reviewed-by: Craig Hesling <hesling@chromium.org>