diff options
author | Tom Hughes <tomhughes@chromium.org> | 2020-01-02 15:36:04 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-01-08 00:47:29 +0000 |
commit | 0b838e162b35c6115de2cc049df699a65f9ee019 (patch) | |
tree | 84d4e83e193f1c884695f12673f3b0f9028ac19a /include/fpsensor_detect.h | |
parent | ceaa05993490943b19cdf61bcd195cf016d31827 (diff) | |
download | chrome-ec-0b838e162b35c6115de2cc049df699a65f9ee019.tar.gz |
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 <tomhughes@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1986322
Reviewed-by: Craig Hesling <hesling@chromium.org>
Diffstat (limited to 'include/fpsensor_detect.h')
-rw-r--r-- | include/fpsensor_detect.h | 28 |
1 files changed, 28 insertions, 0 deletions
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 */ |