From 0b838e162b35c6115de2cc049df699a65f9ee019 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Thu, 2 Jan 2020 15:36:04 -0800 Subject: bloonchipper: Add transport and sensor detection bloonchipper (aka hatch_fp aka dragonclaw) has a voltage divider that can be used to select the sensor and the transport type. Supported designs: * Dragonclaw rev 0.2 (green with Google logo): go/dragonclaw-schematic-rev-0.2 * Hatch reference v3.0: go/hatch-schematic-rev-3.0 The selection lines are connected to ADC inputs, so a future change will use the ADC to allow more than two transports or sensors. BRANCH=none BUG=b:147113851 TEST=flash dragonclaw rev 0.2 and view console output Change-Id: If2e4b150d34cfe41477be528c70e1645043d4d82 Signed-off-by: Tom Hughes Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1986322 Reviewed-by: Craig Hesling --- include/fpsensor_detect.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 include/fpsensor_detect.h (limited to 'include/fpsensor_detect.h') diff --git a/include/fpsensor_detect.h b/include/fpsensor_detect.h new file mode 100644 index 0000000000..e12ff76595 --- /dev/null +++ b/include/fpsensor_detect.h @@ -0,0 +1,28 @@ +/* Copyright 2020 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. + */ + +/* Fingerprint sensor detection (transport and sensor). */ + +#ifndef __CROS_EC_FPSENSOR_DETECT_H +#define __CROS_EC_FPSENSOR_DETECT_H + +enum fp_sensor_type { + FP_SENSOR_TYPE_UNKNOWN = -1, + FP_SENSOR_TYPE_FPC, + FP_SENSOR_TYPE_ELAN, +}; + +enum fp_transport_type { + FP_TRANSPORT_TYPE_UNKNOWN = -1, + FP_TRANSPORT_TYPE_SPI, + FP_TRANSPORT_TYPE_UART +}; + +const char *fp_transport_type_to_str(enum fp_transport_type type); +const char *fp_sensor_type_to_str(enum fp_sensor_type type); +enum fp_sensor_type get_fp_sensor_type(void); +enum fp_transport_type get_fp_transport_type(void); + +#endif /* __CROS_EC_FPSENSOR_DETECT_H */ -- cgit v1.2.1