From 201a9710afd383110e86fb9b599a42057855eb71 Mon Sep 17 00:00:00 2001 From: Patryk Duda Date: Mon, 19 Jul 2021 13:26:57 +0200 Subject: hatch_fp/board_rw: Set DIVIDER_HIGHSIDE to 1 during board init 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 Change-Id: I9cf50ef1377da2dec57d73f9e1374928da86481d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3034857 Reviewed-by: Craig Hesling --- driver/fingerprint/fpc/bep/fpc_private.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'driver') diff --git a/driver/fingerprint/fpc/bep/fpc_private.c b/driver/fingerprint/fpc/bep/fpc_private.c index ae4b8d834b..a94ba2ab06 100644 --- a/driver/fingerprint/fpc/bep/fpc_private.c +++ b/driver/fingerprint/fpc/bep/fpc_private.c @@ -143,12 +143,6 @@ int fp_sensor_init(void) { int rc; - /* The dragonclaw development board needs this enabled to enable the - * AND gate (U10) to CS. Production boards could disable this to save - * power since it's only needed for initial detection on those boards. - */ - gpio_set_level(GPIO_DIVIDER_HIGHSIDE, 1); - /* Print the binary libfpbep.a library version */ CPRINTS("FPC libfpbep.a %s", fp_sensor_get_version()); -- cgit v1.2.1