summaryrefslogtreecommitdiff
path: root/driver/fingerprint/fpc/bep/fpc_sensor_spi.c
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-11-04 12:11:58 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-05 04:22:34 +0000
commit252457d4b21f46889eebad61d4c0a65331919cec (patch)
tree01856c4d31d710b20e85a74c8d7b5836e35c3b98 /driver/fingerprint/fpc/bep/fpc_sensor_spi.c
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-stabilize-14438.B-ish.tar.gz
In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'driver/fingerprint/fpc/bep/fpc_sensor_spi.c')
-rw-r--r--driver/fingerprint/fpc/bep/fpc_sensor_spi.c94
1 files changed, 0 insertions, 94 deletions
diff --git a/driver/fingerprint/fpc/bep/fpc_sensor_spi.c b/driver/fingerprint/fpc/bep/fpc_sensor_spi.c
deleted file mode 100644
index 225752bdb6..0000000000
--- a/driver/fingerprint/fpc/bep/fpc_sensor_spi.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/* Copyright 2019 The Chromium OS Authors. All rights reserved.
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-/* FPC Platform Abstraction Layer */
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <stddef.h>
-
-#include "console.h"
-#include "fpsensor.h"
-#include "fpc_sensor_spi.h"
-#include "gpio.h"
-#include "spi.h"
-#include "util.h"
-
-#include "driver/fingerprint/fpc/fpc_sensor.h"
-
-/* Console output macros */
-#define CPRINTF(format, args...) cprintf(CC_FP, format, ##args)
-#define CPRINTS(format, args...) cprints(CC_FP, format, ##args)
-
-#define SPI_BUF_SIZE (1024)
-
-#define FPC_RESULT_OK (0)
-#define FPC_RESULT_IO_ERROR (-8)
-
-static uint8_t spi_buf[SPI_BUF_SIZE] FP_FRAME_SECTION __aligned(4);
-
-int __unused fpc_sensor_spi_write_read(uint8_t *write, uint8_t *read,
- size_t size, bool leave_cs_asserted)
-{
- int rc = 0;
-
- if (size == FP_SENSOR_REAL_IMAGE_SIZE) {
- rc |= spi_transaction(SPI_FP_DEVICE, write, size, read,
- SPI_READBACK_ALL);
- spi_transaction_flush(SPI_FP_DEVICE);
- } else if (size <= SPI_BUF_SIZE) {
- memcpy(spi_buf, write, size);
- rc |= spi_transaction_async(SPI_FP_DEVICE, spi_buf, size,
- spi_buf, SPI_READBACK_ALL);
-
- /* De-asserting the sensor chip-select will clear the sensor
- * internal command state. To run multiple sensor transactions
- * in the same command state (typically image capture), leave
- * chip-select asserted. Make sure chip-select is de-asserted
- * when all transactions are finished.
- */
- if (!leave_cs_asserted)
- spi_transaction_flush(SPI_FP_DEVICE);
- else
- spi_transaction_wait(SPI_FP_DEVICE);
-
- memcpy(read, spi_buf, size);
- } else {
- rc = -1;
- }
-
- if (rc == 0) {
- return FPC_RESULT_OK;
- } else {
- CPRINTS("Error: spi_transaction()/spi_transaction_async() failed, result=%d",
- rc);
- return FPC_RESULT_IO_ERROR;
- }
-}
-
-bool __unused fpc_sensor_spi_check_irq(void)
-{
- return (gpio_get_level(GPIO_FPS_INT) == 1);
-}
-
-bool __unused fpc_sensor_spi_read_irq(void)
-{
- return (gpio_get_level(GPIO_FPS_INT) == 1);
-}
-
-void __unused fpc_sensor_spi_reset(bool state)
-{
- gpio_set_level(GPIO_FP_RST_ODL, state ? 0 : 1);
-}
-
-void __unused fpc_sensor_spi_init(uint32_t speed_hz)
-{
-}
-
-int __unused fpc_sensor_wfi(uint16_t timeout_ms, fpc_wfi_check_t enter_wfi,
- bool enter_wfi_mode)
-{
- return FPC_RESULT_OK;
-}