summaryrefslogtreecommitdiff
path: root/driver/fingerprint/elan/elan_sensor_pal.h
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/elan/elan_sensor_pal.h
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-stabilize-14532.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/elan/elan_sensor_pal.h')
-rw-r--r--driver/fingerprint/elan/elan_sensor_pal.h141
1 files changed, 0 insertions, 141 deletions
diff --git a/driver/fingerprint/elan/elan_sensor_pal.h b/driver/fingerprint/elan/elan_sensor_pal.h
deleted file mode 100644
index 067b693245..0000000000
--- a/driver/fingerprint/elan/elan_sensor_pal.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/* Copyright 2021 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.
- */
-/* ELAN Platform Abstraction Layer callbacks */
-
-#ifndef ELAN_SENSOR_PAL_H_
-#define ELAN_SENSOR_PAL_H_
-
-/* ELAN error codes */
-enum elan_error_code {
- ELAN_ERROR_NONE = 0,
- ELAN_ERROR_SPI = 1,
- ELAN_ERROR_SCAN = 2,
- ELAN_ERROR_CAL = 3,
- ELAN_ERROR_DEFECT_NUM = 4,
- ELAN_ERROR_DEFECT_X = 5,
- ELAN_ERROR_DEFECT_Y = 6
-};
-
-/* ELAN error info */
-typedef struct {
- uint32_t num_defective_pixels;
- uint16_t sensor_error_code;
-} fp_sensor_info_t;
-
-/**
- * @brief Write fp command to the sensor
- *
- * @param[in] fp_cmd One byte fp command to write
- *
- * @return 0 on success.
- * negative value on error.
- */
-int elan_write_cmd(uint8_t fp_cmd);
-
-/**
- * @brief Read fp register data from the sensor
- *
- * @param[in] fp_cmd One byte fp command to read
- * @param[out] regdata One byte data where register's data will be stored
- *
- * @return 0 on success.
- * negative value on error.
- */
-int elan_read_cmd(uint8_t fp_cmd, uint8_t *regdata);
-
-/**
- * @brief Transfers and receives SPI data.
- *
- * @param[in] tx The buffer to transfer
- * @param[in] tx_len The length to transfer
- * @param[out] rx The buffer where read data will be stored
- * @param[in] rx_len The length to receive
- * @return 0 on success.
- * negative value on error.
- */
-int elan_spi_transaction(uint8_t *tx, int tx_len, uint8_t *rx, int rx_len);
-
-/**
- * @brief Write fp register data to sensor
- *
- * @param[in] regaddr One byte register address to write
- * @param[in] regdata Data to write to register
- *
- * @return 0 on success.
- * negative value on error.
- */
-int elan_write_register(uint8_t regaddr, uint8_t regdata);
-
-/**
- * @brief Select sensor RAM page of register
- *
- * @param[in] page The number of RAM page control registers
- *
- * @return 0 on success.
- * negative value on error.
- */
-int elan_write_page(uint8_t page);
-
-/**
- * @brief Write register table to fp sensor
- *
- * Using a table to write data to sensor register.
- * This table contains multiple pairs of address and data to
- * be written.
- *
- * @param[in] reg_table The register address to write
- * @param[in] length The data to write to register
- *
- * @return 0 on success.
- * negative value on error.
- */
-int elan_write_reg_vector(const uint8_t *reg_table, int length);
-
-/**
- * Get 14bits raw image data from ELAN fingerprint sensor
- *
- * @param[out] short_raw The memory buffer to receive fingerprint image
- * raw data, buffer length is:
- * (IMAGE_WIDTH*IMAGE_HEIGHT)*sizeof(uint16_t)
- *
- * @return 0 on success.
- * negative value on error.
- */
-int raw_capture(uint16_t *short_raw);
-
-/**
- * Execute calibrate ELAN fingerprint sensor flow.
- *
- * @return 0 on success.
- * negative value on error.
- */
-int elan_execute_calibration(void);
-
-/**
- * Execute reset ELAN fingerprint sensor flow.
- */
-void elan_execute_reset(void);
-
-/**
- * Runs a test for defective pixels.
- *
- * @param[out] fp_sensor_info Structure containing output data.
- *
- * @return 0 on success.
- * negative value on error.
- */
-int fp_sensor_maintenance(fp_sensor_info_t *fp_sensor_info);
-
-/**
- * @brief Set sensor reset state.
- *
- * Set sensor reset state.
- *
- * @param[in] state Reset state.
- * true => reset sensor, i.e. low GPIO state
- * false => normal operation, i.e. high GPIO state
- */
-void __unused elan_sensor_set_rst(bool state);
-#endif