summaryrefslogtreecommitdiff
path: root/driver/fingerprint
diff options
context:
space:
mode:
Diffstat (limited to 'driver/fingerprint')
-rw-r--r--driver/fingerprint/build.mk2
-rw-r--r--driver/fingerprint/elan/build.mk2
-rw-r--r--driver/fingerprint/elan/elan_private.c2
-rw-r--r--driver/fingerprint/elan/elan_sensor.h2
-rw-r--r--driver/fingerprint/elan/elan_sensor_pal.c2
-rw-r--r--driver/fingerprint/elan/elan_sensor_pal.h2
-rw-r--r--driver/fingerprint/elan/elan_setting.h2
-rw-r--r--driver/fingerprint/fpc/bep/build.mk2
-rw-r--r--driver/fingerprint/fpc/bep/fpc1025_private.h18
-rw-r--r--driver/fingerprint/fpc/bep/fpc1035_private.h18
-rw-r--r--driver/fingerprint/fpc/bep/fpc_bio_algorithm.h24
-rw-r--r--driver/fingerprint/fpc/bep/fpc_misc.c2
-rw-r--r--driver/fingerprint/fpc/bep/fpc_private.c12
-rw-r--r--driver/fingerprint/fpc/bep/fpc_private.h4
-rw-r--r--driver/fingerprint/fpc/bep/fpc_sensor_spi.c8
-rw-r--r--driver/fingerprint/fpc/bep/fpc_sensor_spi.h2
-rw-r--r--driver/fingerprint/fpc/bep/fpc_timebase.c2
-rw-r--r--driver/fingerprint/fpc/bep/fpc_timebase.h2
-rw-r--r--driver/fingerprint/fpc/build.mk2
-rw-r--r--driver/fingerprint/fpc/fpc_sensor.c2
-rw-r--r--driver/fingerprint/fpc/fpc_sensor.h2
-rw-r--r--driver/fingerprint/fpc/libfp/build.mk2
-rw-r--r--driver/fingerprint/fpc/libfp/fpc1145_private.h16
-rw-r--r--driver/fingerprint/fpc/libfp/fpc_bio_algorithm.h18
-rw-r--r--driver/fingerprint/fpc/libfp/fpc_private.c26
-rw-r--r--driver/fingerprint/fpc/libfp/fpc_private.h168
-rw-r--r--driver/fingerprint/fpc/libfp/fpc_sensor_pal.c6
-rw-r--r--driver/fingerprint/fpc/libfp/fpc_sensor_pal.h14
-rw-r--r--driver/fingerprint/fpsensor.h2
29 files changed, 194 insertions, 172 deletions
diff --git a/driver/fingerprint/build.mk b/driver/fingerprint/build.mk
index 6cb9dc7adb..d0d92cb011 100644
--- a/driver/fingerprint/build.mk
+++ b/driver/fingerprint/build.mk
@@ -1,4 +1,4 @@
-# Copyright 2019 The Chromium OS Authors. All rights reserved.
+# Copyright 2019 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
diff --git a/driver/fingerprint/elan/build.mk b/driver/fingerprint/elan/build.mk
index 2e4ad2d46f..791cce9e73 100644
--- a/driver/fingerprint/elan/build.mk
+++ b/driver/fingerprint/elan/build.mk
@@ -1,4 +1,4 @@
-# Copyright 2021 The Chromium OS Authors. All rights reserved.
+# Copyright 2021 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
diff --git a/driver/fingerprint/elan/elan_private.c b/driver/fingerprint/elan/elan_private.c
index 555ad14ba0..fc95ceb685 100644
--- a/driver/fingerprint/elan/elan_private.c
+++ b/driver/fingerprint/elan/elan_private.c
@@ -1,4 +1,4 @@
-/* Copyright 2021 The Chromium OS Authors. All rights reserved.
+/* Copyright 2021 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
diff --git a/driver/fingerprint/elan/elan_sensor.h b/driver/fingerprint/elan/elan_sensor.h
index 490b1acf16..f294a00f4b 100644
--- a/driver/fingerprint/elan/elan_sensor.h
+++ b/driver/fingerprint/elan/elan_sensor.h
@@ -1,4 +1,4 @@
-/* Copyright 2021 The Chromium OS Authors. All rights reserved.
+/* Copyright 2021 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
diff --git a/driver/fingerprint/elan/elan_sensor_pal.c b/driver/fingerprint/elan/elan_sensor_pal.c
index b59368b835..4056c52f38 100644
--- a/driver/fingerprint/elan/elan_sensor_pal.c
+++ b/driver/fingerprint/elan/elan_sensor_pal.c
@@ -1,4 +1,4 @@
-/* Copyright 2021 The Chromium OS Authors. All rights reserved.
+/* Copyright 2021 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
diff --git a/driver/fingerprint/elan/elan_sensor_pal.h b/driver/fingerprint/elan/elan_sensor_pal.h
index 067b693245..235dcd5fa8 100644
--- a/driver/fingerprint/elan/elan_sensor_pal.h
+++ b/driver/fingerprint/elan/elan_sensor_pal.h
@@ -1,4 +1,4 @@
-/* Copyright 2021 The Chromium OS Authors. All rights reserved.
+/* Copyright 2021 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
diff --git a/driver/fingerprint/elan/elan_setting.h b/driver/fingerprint/elan/elan_setting.h
index feaf5e1550..7e62653b8f 100644
--- a/driver/fingerprint/elan/elan_setting.h
+++ b/driver/fingerprint/elan/elan_setting.h
@@ -1,4 +1,4 @@
-/* Copyright 2021 The Chromium OS Authors. All rights reserved.
+/* Copyright 2021 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
diff --git a/driver/fingerprint/fpc/bep/build.mk b/driver/fingerprint/fpc/bep/build.mk
index ac7f05fb60..ac5879a913 100644
--- a/driver/fingerprint/fpc/bep/build.mk
+++ b/driver/fingerprint/fpc/bep/build.mk
@@ -1,4 +1,4 @@
-# Copyright 2019 The Chromium OS Authors. All rights reserved.
+# Copyright 2019 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
diff --git a/driver/fingerprint/fpc/bep/fpc1025_private.h b/driver/fingerprint/fpc/bep/fpc1025_private.h
index 2da127741f..35745c3119 100644
--- a/driver/fingerprint/fpc/bep/fpc1025_private.h
+++ b/driver/fingerprint/fpc/bep/fpc1025_private.h
@@ -1,4 +1,4 @@
-/* Copyright 2019 The Chromium OS Authors. All rights reserved.
+/* Copyright 2019 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -13,19 +13,19 @@
#define FP_SENSOR_NAME "FPC1025"
/* Sensor pixel resolution */
-#define FP_SENSOR_RES_X (160) /**< Sensor width */
-#define FP_SENSOR_RES_Y (160) /**< Sensor height */
-#define FP_SENSOR_RES_BPP (8) /**< Resolution bits per pixel */
+#define FP_SENSOR_RES_X (160) /**< Sensor width */
+#define FP_SENSOR_RES_Y (160) /**< Sensor height */
+#define FP_SENSOR_RES_BPP (8) /**< Resolution bits per pixel */
/*
* Sensor image size
*
* Value from fpc_bep_image_get_buffer_size(): (160*160)+660
*/
-#define FP_SENSOR_IMAGE_SIZE (26260)
-#define FP_SENSOR_REAL_IMAGE_SIZE (FP_SENSOR_RES_X * FP_SENSOR_RES_Y)
+#define FP_SENSOR_IMAGE_SIZE (26260)
+#define FP_SENSOR_REAL_IMAGE_SIZE (FP_SENSOR_RES_X * FP_SENSOR_RES_Y)
/* Offset of image data in fp_buffer */
-#define FP_SENSOR_IMAGE_OFFSET (400)
+#define FP_SENSOR_IMAGE_OFFSET (400)
/*
* Constant value for the enrollment data size
@@ -41,9 +41,9 @@
*
* Template size + alignment padding + size of template size variable
*/
-#define FP_ALGORITHM_TEMPLATE_SIZE (5088 + 0 + 4)
+#define FP_ALGORITHM_TEMPLATE_SIZE (5088 + 0 + 4)
/* Max number of templates stored / matched against */
-#define FP_MAX_FINGER_COUNT (5)
+#define FP_MAX_FINGER_COUNT (5)
#endif /* __CROS_EC_FPC1025_PRIVATE_H */
diff --git a/driver/fingerprint/fpc/bep/fpc1035_private.h b/driver/fingerprint/fpc/bep/fpc1035_private.h
index 695228898b..41112b96c2 100644
--- a/driver/fingerprint/fpc/bep/fpc1035_private.h
+++ b/driver/fingerprint/fpc/bep/fpc1035_private.h
@@ -1,4 +1,4 @@
-/* Copyright 2019 The Chromium OS Authors. All rights reserved.
+/* Copyright 2019 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -13,19 +13,19 @@
#define FP_SENSOR_NAME "FPC1035"
/* Sensor pixel resolution */
-#define FP_SENSOR_RES_X (112) /**< Sensor width */
-#define FP_SENSOR_RES_Y (88) /**< Sensor height */
-#define FP_SENSOR_RES_BPP (8) /**< Resolution bits per pixel */
+#define FP_SENSOR_RES_X (112) /**< Sensor width */
+#define FP_SENSOR_RES_Y (88) /**< Sensor height */
+#define FP_SENSOR_RES_BPP (8) /**< Resolution bits per pixel */
/*
* Sensor image size
*
* Value from fpc_bep_image_get_buffer_size(): (112*88)+660
*/
-#define FP_SENSOR_IMAGE_SIZE (10516)
-#define FP_SENSOR_REAL_IMAGE_SIZE (FP_SENSOR_RES_X * FP_SENSOR_RES_Y)
+#define FP_SENSOR_IMAGE_SIZE (10516)
+#define FP_SENSOR_REAL_IMAGE_SIZE (FP_SENSOR_RES_X * FP_SENSOR_RES_Y)
/* Offset of image data in fp_buffer */
-#define FP_SENSOR_IMAGE_OFFSET (400)
+#define FP_SENSOR_IMAGE_OFFSET (400)
/*
* Constant value for the enrollment data size
@@ -41,9 +41,9 @@
*
* Template size + alignment padding + size of template size variable
*/
-#define FP_ALGORITHM_TEMPLATE_SIZE (14373 + 3 + 4)
+#define FP_ALGORITHM_TEMPLATE_SIZE (14373 + 3 + 4)
/* Max number of templates stored / matched against */
-#define FP_MAX_FINGER_COUNT (5)
+#define FP_MAX_FINGER_COUNT (5)
#endif /* __CROS_EC_FPC1035_PRIVATE_H */
diff --git a/driver/fingerprint/fpc/bep/fpc_bio_algorithm.h b/driver/fingerprint/fpc/bep/fpc_bio_algorithm.h
index 1bf598a3ee..1da01d0a08 100644
--- a/driver/fingerprint/fpc/bep/fpc_bio_algorithm.h
+++ b/driver/fingerprint/fpc/bep/fpc_bio_algorithm.h
@@ -1,4 +1,4 @@
-/* Copyright 2019 The Chromium OS Authors. All rights reserved.
+/* Copyright 2019 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -66,12 +66,12 @@ int bio_algorithm_exit(void);
* - BIO_TEMPLATE_LOW_COVERAGE when matching could not be performed due to
* finger covering too little area of the sensor
*/
-#define BIO_TEMPLATE_NO_MATCH 0
-#define BIO_TEMPLATE_MATCH 1
-#define BIO_TEMPLATE_MATCH_UPDATED 3
+#define BIO_TEMPLATE_NO_MATCH 0
+#define BIO_TEMPLATE_MATCH 1
+#define BIO_TEMPLATE_MATCH_UPDATED 3
#define BIO_TEMPLATE_MATCH_UPDATE_FAILED 5
-#define BIO_TEMPLATE_LOW_QUALITY 2
-#define BIO_TEMPLATE_LOW_COVERAGE 4
+#define BIO_TEMPLATE_LOW_QUALITY 2
+#define BIO_TEMPLATE_LOW_COVERAGE 4
int bio_template_image_match_list(bio_template_t templ, uint32_t num_templ,
bio_image_t image, int32_t *match_index,
@@ -101,14 +101,14 @@ int bio_enrollment_begin(bio_enrollment_t *enrollment);
* finger covering too little area of the sensor
* - BIO_ENROLLMENT_INTERNAL_ERROR when an internal error occurred
*/
-#define BIO_ENROLLMENT_OK 0
-#define BIO_ENROLLMENT_LOW_QUALITY 1
-#define BIO_ENROLLMENT_IMMOBILE 2
-#define BIO_ENROLLMENT_LOW_COVERAGE 3
-#define BIO_ENROLLMENT_INTERNAL_ERROR 5
+#define BIO_ENROLLMENT_OK 0
+#define BIO_ENROLLMENT_LOW_QUALITY 1
+#define BIO_ENROLLMENT_IMMOBILE 2
+#define BIO_ENROLLMENT_LOW_COVERAGE 3
+#define BIO_ENROLLMENT_INTERNAL_ERROR 5
/* Can be used to detect if image was usable for enrollment or not. */
-#define BIO_ENROLLMENT_PROBLEM_MASK 1
+#define BIO_ENROLLMENT_PROBLEM_MASK 1
int bio_enrollment_add_image(bio_enrollment_t enrollment, bio_image_t image);
/*
* Returns percent of coverage accumulated during enrollment process.
diff --git a/driver/fingerprint/fpc/bep/fpc_misc.c b/driver/fingerprint/fpc/bep/fpc_misc.c
index c4c779b702..4eed7c603b 100644
--- a/driver/fingerprint/fpc/bep/fpc_misc.c
+++ b/driver/fingerprint/fpc/bep/fpc_misc.c
@@ -1,4 +1,4 @@
-/* Copyright 2019 The Chromium OS Authors. All rights reserved.
+/* Copyright 2019 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
diff --git a/driver/fingerprint/fpc/bep/fpc_private.c b/driver/fingerprint/fpc/bep/fpc_private.c
index 03ea84b899..ac20e10758 100644
--- a/driver/fingerprint/fpc/bep/fpc_private.c
+++ b/driver/fingerprint/fpc/bep/fpc_private.c
@@ -1,4 +1,4 @@
-/* Copyright 2019 The Chromium OS Authors. All rights reserved.
+/* Copyright 2019 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -16,10 +16,10 @@
#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 CPRINTF(format, args...) cprintf(CC_FP, format, ##args)
+#define CPRINTS(format, args...) cprints(CC_FP, format, ##args)
-static uint8_t enroll_ctx[FP_ALGORITHM_ENROLLMENT_SIZE] __aligned(4) = {0};
+static uint8_t enroll_ctx[FP_ALGORITHM_ENROLLMENT_SIZE] __aligned(4) = { 0 };
/* Recorded error flags */
static uint16_t errors;
@@ -91,8 +91,8 @@ const fpc_bio_info_t fpc_bio_info = {
/* Sensor IC commands */
enum fpc_cmd {
- FPC_CMD_DEEPSLEEP = 0x2C,
- FPC_CMD_HW_ID = 0xFC,
+ FPC_CMD_DEEPSLEEP = 0x2C,
+ FPC_CMD_HW_ID = 0xFC,
};
/* Maximum size of a sensor command SPI transfer */
diff --git a/driver/fingerprint/fpc/bep/fpc_private.h b/driver/fingerprint/fpc/bep/fpc_private.h
index 1c01d61207..ca5b98fa8e 100644
--- a/driver/fingerprint/fpc/bep/fpc_private.h
+++ b/driver/fingerprint/fpc/bep/fpc_private.h
@@ -1,4 +1,4 @@
-/* Copyright 2020 The Chromium OS Authors. All rights reserved.
+/* Copyright 2020 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -46,4 +46,4 @@ int fp_sensor_maintenance(uint8_t *image_data,
*/
int fpc_get_hwid(uint16_t *id);
-#endif /* __CROS_EC_FPC_PRIVATE_H */
+#endif /* __CROS_EC_FPC_PRIVATE_H */
diff --git a/driver/fingerprint/fpc/bep/fpc_sensor_spi.c b/driver/fingerprint/fpc/bep/fpc_sensor_spi.c
index 225752bdb6..752b9909bc 100644
--- a/driver/fingerprint/fpc/bep/fpc_sensor_spi.c
+++ b/driver/fingerprint/fpc/bep/fpc_sensor_spi.c
@@ -1,4 +1,4 @@
-/* Copyright 2019 The Chromium OS Authors. All rights reserved.
+/* Copyright 2019 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -22,10 +22,10 @@
#define CPRINTF(format, args...) cprintf(CC_FP, format, ##args)
#define CPRINTS(format, args...) cprints(CC_FP, format, ##args)
-#define SPI_BUF_SIZE (1024)
+#define SPI_BUF_SIZE (1024)
-#define FPC_RESULT_OK (0)
-#define FPC_RESULT_IO_ERROR (-8)
+#define FPC_RESULT_OK (0)
+#define FPC_RESULT_IO_ERROR (-8)
static uint8_t spi_buf[SPI_BUF_SIZE] FP_FRAME_SECTION __aligned(4);
diff --git a/driver/fingerprint/fpc/bep/fpc_sensor_spi.h b/driver/fingerprint/fpc/bep/fpc_sensor_spi.h
index 25d29d77a3..ad7e5411d8 100644
--- a/driver/fingerprint/fpc/bep/fpc_sensor_spi.h
+++ b/driver/fingerprint/fpc/bep/fpc_sensor_spi.h
@@ -1,4 +1,4 @@
-/* Copyright 2019 The Chromium OS Authors. All rights reserved.
+/* Copyright 2019 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
diff --git a/driver/fingerprint/fpc/bep/fpc_timebase.c b/driver/fingerprint/fpc/bep/fpc_timebase.c
index 113e150ed9..a63a4c3d6d 100644
--- a/driver/fingerprint/fpc/bep/fpc_timebase.c
+++ b/driver/fingerprint/fpc/bep/fpc_timebase.c
@@ -1,4 +1,4 @@
-/* Copyright 2019 The Chromium OS Authors. All rights reserved.
+/* Copyright 2019 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
diff --git a/driver/fingerprint/fpc/bep/fpc_timebase.h b/driver/fingerprint/fpc/bep/fpc_timebase.h
index 388d13293e..ce9018461b 100644
--- a/driver/fingerprint/fpc/bep/fpc_timebase.h
+++ b/driver/fingerprint/fpc/bep/fpc_timebase.h
@@ -1,4 +1,4 @@
-/* Copyright 2019 The Chromium OS Authors. All rights reserved.
+/* Copyright 2019 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
diff --git a/driver/fingerprint/fpc/build.mk b/driver/fingerprint/fpc/build.mk
index 5c18a1f096..f17af5e496 100644
--- a/driver/fingerprint/fpc/build.mk
+++ b/driver/fingerprint/fpc/build.mk
@@ -1,4 +1,4 @@
-# Copyright 2019 The Chromium OS Authors. All rights reserved.
+# Copyright 2019 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
diff --git a/driver/fingerprint/fpc/fpc_sensor.c b/driver/fingerprint/fpc/fpc_sensor.c
index a15502521f..bbab729b12 100644
--- a/driver/fingerprint/fpc/fpc_sensor.c
+++ b/driver/fingerprint/fpc/fpc_sensor.c
@@ -1,4 +1,4 @@
-/* Copyright 2020 The Chromium OS Authors. All rights reserved.
+/* Copyright 2020 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
diff --git a/driver/fingerprint/fpc/fpc_sensor.h b/driver/fingerprint/fpc/fpc_sensor.h
index 2ab9248eeb..22e670afd0 100644
--- a/driver/fingerprint/fpc/fpc_sensor.h
+++ b/driver/fingerprint/fpc/fpc_sensor.h
@@ -1,4 +1,4 @@
-/* Copyright 2019 The Chromium OS Authors. All rights reserved.
+/* Copyright 2019 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
diff --git a/driver/fingerprint/fpc/libfp/build.mk b/driver/fingerprint/fpc/libfp/build.mk
index 3fabab38e9..f22700f309 100644
--- a/driver/fingerprint/fpc/libfp/build.mk
+++ b/driver/fingerprint/fpc/libfp/build.mk
@@ -1,4 +1,4 @@
-# Copyright 2019 The Chromium OS Authors. All rights reserved.
+# Copyright 2019 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
diff --git a/driver/fingerprint/fpc/libfp/fpc1145_private.h b/driver/fingerprint/fpc/libfp/fpc1145_private.h
index 399c75118b..993d1e1ea9 100644
--- a/driver/fingerprint/fpc/libfp/fpc1145_private.h
+++ b/driver/fingerprint/fpc/libfp/fpc1145_private.h
@@ -1,4 +1,4 @@
-/* Copyright 2017 The Chromium OS Authors. All rights reserved.
+/* Copyright 2017 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -21,9 +21,9 @@
#define FP_SENSOR_NAME "FPC1145"
/* Sensor pixel resolution */
-#define FP_SENSOR_RES_Y 192
-#define FP_SENSOR_RES_X 56
-#define FP_SENSOR_RES_BPP 8
+#define FP_SENSOR_RES_Y 192
+#define FP_SENSOR_RES_X 56
+#define FP_SENSOR_RES_BPP 8
/* Acquired finger frame definitions */
#define FP_SENSOR_IMAGE_SIZE_MODE_VENDOR (35460)
@@ -33,17 +33,17 @@
* corresponding value in the MQT tool fputils.py must be changed too.
* See b/111443750 for context.
*/
-#define FP_SENSOR_IMAGE_SIZE_MODE_QUAL (24408)
+#define FP_SENSOR_IMAGE_SIZE_MODE_QUAL (24408)
-#define FP_SENSOR_IMAGE_SIZE FP_SENSOR_IMAGE_SIZE_MODE_VENDOR
+#define FP_SENSOR_IMAGE_SIZE FP_SENSOR_IMAGE_SIZE_MODE_VENDOR
#define FP_SENSOR_IMAGE_OFFSET 2340
/* Opaque FPC context */
#define FP_SENSOR_CONTEXT_SIZE 4944
/* Algorithm buffer sizes */
-#define FP_ALGORITHM_ENROLLMENT_SIZE 28
-#define FP_ALGORITHM_TEMPLATE_SIZE 47552
+#define FP_ALGORITHM_ENROLLMENT_SIZE 28
+#define FP_ALGORITHM_TEMPLATE_SIZE 47552
/* Max number of templates stored / matched against */
#define FP_MAX_FINGER_COUNT 5
diff --git a/driver/fingerprint/fpc/libfp/fpc_bio_algorithm.h b/driver/fingerprint/fpc/libfp/fpc_bio_algorithm.h
index 9c00b14640..7dda6d46de 100644
--- a/driver/fingerprint/fpc/libfp/fpc_bio_algorithm.h
+++ b/driver/fingerprint/fpc/libfp/fpc_bio_algorithm.h
@@ -1,4 +1,4 @@
-/* Copyright 2016 The Chromium OS Authors. All rights reserved.
+/* Copyright 2016 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -196,12 +196,12 @@ int bio_enrollment_begin(bio_sensor_t sensor, bio_enrollment_t *enrollment);
* - BIO_ENROLLMENT_LOW_COVERAGE when image could not be used due to
* finger covering too little area of the sensor
*/
-#define BIO_ENROLLMENT_OK 0
-#define BIO_ENROLLMENT_IMMOBILE 2
-#define BIO_ENROLLMENT_LOW_QUALITY 1
-#define BIO_ENROLLMENT_LOW_COVERAGE 3
+#define BIO_ENROLLMENT_OK 0
+#define BIO_ENROLLMENT_IMMOBILE 2
+#define BIO_ENROLLMENT_LOW_QUALITY 1
+#define BIO_ENROLLMENT_LOW_COVERAGE 3
/* Can be used to detect if image was usable for enrollment or not. */
-#define BIO_ENROLLMENT_PROBLEM_MASK 1
+#define BIO_ENROLLMENT_PROBLEM_MASK 1
int bio_enrollment_add_image(bio_enrollment_t enrollment, bio_image_t image);
/*
* Indicates whether there is enough data in the enrollment for it to be
@@ -236,10 +236,10 @@ int bio_enrollment_get_percent_complete(bio_enrollment_t enrollment);
int bio_enrollment_finish(bio_enrollment_t enrollment, bio_template_t *tmpl);
typedef struct {
- int32_t coverage; /* Sensor coverage in range [0..100] */
- int32_t quality; /* Image quality in range [0..100] */
+ int32_t coverage; /* Sensor coverage in range [0..100] */
+ int32_t quality; /* Image quality in range [0..100] */
int32_t min_coverage; /* Minimum coverage accepted by enroll */
- int32_t min_quality; /* Minimum image quality accepted by enroll */
+ int32_t min_quality; /* Minimum image quality accepted by enroll */
} bio_image_status_t;
/*
diff --git a/driver/fingerprint/fpc/libfp/fpc_private.c b/driver/fingerprint/fpc/libfp/fpc_private.c
index 7e7befcfdc..fcc0180784 100644
--- a/driver/fingerprint/fpc/libfp/fpc_private.c
+++ b/driver/fingerprint/fpc/libfp/fpc_private.c
@@ -1,12 +1,12 @@
-/* Copyright 2017 The Chromium OS Authors. All rights reserved.
+/* Copyright 2017 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <stddef.h>
+#include <sys/types.h>
#include "common.h"
#include "console.h"
-#include "endian.h"
#include "fpc_bio_algorithm.h"
#include "fpc_private.h"
#include "fpsensor.h"
@@ -19,8 +19,8 @@
#include "driver/fingerprint/fpc/fpc_sensor.h"
-#define CPRINTF(format, args...) cprintf(CC_FP, format, ## args)
-#define CPRINTS(format, args...) cprints(CC_FP, format, ## args)
+#define CPRINTF(format, args...) cprintf(CC_FP, format, ##args)
+#define CPRINTS(format, args...) cprints(CC_FP, format, ##args)
/* Minimum reset duration */
#define FP_SENSOR_RESET_DURATION_US (10 * MSEC)
@@ -32,7 +32,7 @@
#define FP_SENSOR_OPEN_DELAY_US (500 * MSEC)
/* Decode internal error codes from FPC's sensor library */
-#define FPC_GET_INTERNAL_CODE(res) (((res) & 0x000fc000) >> 14)
+#define FPC_GET_INTERNAL_CODE(res) (((res)&0x000fc000) >> 14)
/* There was a finger on the sensor when calibrating finger detect */
#define FPC_INTERNAL_FINGER_DFD FPC_ERROR_INTERNAL_38
@@ -64,14 +64,14 @@ static struct ec_response_fp_info fpc1145_info = {
/* Sensor IC commands */
enum fpc_cmd {
- FPC_CMD_STATUS = 0x14,
- FPC_CMD_INT_STS = 0x18,
- FPC_CMD_INT_CLR = 0x1C,
- FPC_CMD_FINGER_QUERY = 0x20,
- FPC_CMD_SLEEP = 0x28,
- FPC_CMD_DEEPSLEEP = 0x2C,
- FPC_CMD_SOFT_RESET = 0xF8,
- FPC_CMD_HW_ID = 0xFC,
+ FPC_CMD_STATUS = 0x14,
+ FPC_CMD_INT_STS = 0x18,
+ FPC_CMD_INT_CLR = 0x1C,
+ FPC_CMD_FINGER_QUERY = 0x20,
+ FPC_CMD_SLEEP = 0x28,
+ FPC_CMD_DEEPSLEEP = 0x2C,
+ FPC_CMD_SOFT_RESET = 0xF8,
+ FPC_CMD_HW_ID = 0xFC,
};
/* Maximum size of a sensor command SPI transfer */
diff --git a/driver/fingerprint/fpc/libfp/fpc_private.h b/driver/fingerprint/fpc/libfp/fpc_private.h
index bd9ff711b6..19ac3b7a13 100644
--- a/driver/fingerprint/fpc/libfp/fpc_private.h
+++ b/driver/fingerprint/fpc/libfp/fpc_private.h
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -10,83 +10,103 @@
/* External error codes from FPC's sensor library */
enum fpc_error_code_external {
- FPC_ERROR_NONE = 0,
- FPC_ERROR_NOT_FOUND = 1,
- FPC_ERROR_CAN_BE_USED_2 = 2,
- FPC_ERROR_CAN_BE_USED_3 = 3,
- FPC_ERROR_CAN_BE_USED_4 = 4,
- FPC_ERROR_PAL = 5,
- FPC_ERROR_IO = 6,
- FPC_ERROR_CANCELLED = 7,
- FPC_ERROR_UNKNOWN = 8,
- FPC_ERROR_MEMORY = 9,
- FPC_ERROR_PARAMETER = 10,
- FPC_ERROR_TEST_FAILED = 11,
- FPC_ERROR_TIMEDOUT = 12,
- FPC_ERROR_SENSOR = 13,
- FPC_ERROR_SPI = 14,
- FPC_ERROR_NOT_SUPPORTED = 15,
- FPC_ERROR_OTP = 16,
- FPC_ERROR_STATE = 17,
- FPC_ERROR_PN = 18,
- FPC_ERROR_DEAD_PIXELS = 19,
- FPC_ERROR_TEMPLATE_CORRUPTED = 20,
- FPC_ERROR_CRC = 21,
- FPC_ERROR_STORAGE = 22, /**< Errors related to storage **/
- FPC_ERROR_MAXIMUM_REACHED = 23, /**< The allowed maximum has been reached **/
- FPC_ERROR_MINIMUM_NOT_REACHED = 24, /**< The required minimum was not reached **/
- FPC_ERROR_SENSOR_LOW_COVERAGE = 25, /**< Minimum sensor coverage was not reached **/
- FPC_ERROR_SENSOR_LOW_QUALITY = 26, /**< Sensor image is considered low quality **/
- FPC_ERROR_SENSOR_FINGER_NOT_STABLE = 27, /**< Finger was not stable during image capture **/
+ FPC_ERROR_NONE = 0,
+ FPC_ERROR_NOT_FOUND = 1,
+ FPC_ERROR_CAN_BE_USED_2 = 2,
+ FPC_ERROR_CAN_BE_USED_3 = 3,
+ FPC_ERROR_CAN_BE_USED_4 = 4,
+ FPC_ERROR_PAL = 5,
+ FPC_ERROR_IO = 6,
+ FPC_ERROR_CANCELLED = 7,
+ FPC_ERROR_UNKNOWN = 8,
+ FPC_ERROR_MEMORY = 9,
+ FPC_ERROR_PARAMETER = 10,
+ FPC_ERROR_TEST_FAILED = 11,
+ FPC_ERROR_TIMEDOUT = 12,
+ FPC_ERROR_SENSOR = 13,
+ FPC_ERROR_SPI = 14,
+ FPC_ERROR_NOT_SUPPORTED = 15,
+ FPC_ERROR_OTP = 16,
+ FPC_ERROR_STATE = 17,
+ FPC_ERROR_PN = 18,
+ FPC_ERROR_DEAD_PIXELS = 19,
+ FPC_ERROR_TEMPLATE_CORRUPTED = 20,
+ FPC_ERROR_CRC = 21,
+ FPC_ERROR_STORAGE = 22, /**< Errors related to storage **/
+ FPC_ERROR_MAXIMUM_REACHED = 23, /**< The allowed maximum has been
+ reached **/
+ FPC_ERROR_MINIMUM_NOT_REACHED = 24, /**< The required minimum was not
+ reached **/
+ FPC_ERROR_SENSOR_LOW_COVERAGE = 25, /**< Minimum sensor coverage was not
+ reached **/
+ FPC_ERROR_SENSOR_LOW_QUALITY = 26, /**< Sensor image is considered low
+ quality **/
+ FPC_ERROR_SENSOR_FINGER_NOT_STABLE = 27, /**< Finger was not stable
+ during image capture **/
};
/* Internal error codes from FPC's sensor library */
enum fpc_error_code_internal {
- FPC_ERROR_INTERNAL_0 = 0, /* Indicates that no internal code was set. */
- FPC_ERROR_INTERNAL_1 = 1, /* Not supported by sensor. */
- FPC_ERROR_INTERNAL_2 = 2, /* Sensor got a NULL response (from other module). */
- FPC_ERROR_INTERNAL_3 = 3, /* Runtime config not supported by firmware. */
- FPC_ERROR_INTERNAL_4 = 4, /* CAC has not been created. */
- FPC_ERROR_INTERNAL_5 = 5, /* CAC returned an error to the sensor. */
- FPC_ERROR_INTERNAL_6 = 6, /* CAC fasttap image capture failed. */
- FPC_ERROR_INTERNAL_7 = 7, /* CAC fasttap image capture failed. */
- FPC_ERROR_INTERNAL_8 = 8, /* CAC Simple image capture failed. */
- FPC_ERROR_INTERNAL_9 = 9, /* CAC custom image capture failed. */
- FPC_ERROR_INTERNAL_10 = 10, /* CAC MQT image capture failed. */
- FPC_ERROR_INTERNAL_11 = 11, /* CAC PN image capture failed. */
- FPC_ERROR_INTERNAL_12 = 12, /* Reading CAC context size. */
- FPC_ERROR_INTERNAL_13 = 13, /* Reading CAC context size. */
- FPC_ERROR_INTERNAL_14 = 14, /* Sensor context invalid. */
- FPC_ERROR_INTERNAL_15 = 15, /* Buffer reference is invalid. */
- FPC_ERROR_INTERNAL_16 = 16, /* Buffer size reference is invalid. */
- FPC_ERROR_INTERNAL_17 = 17, /* Image data reference is invalid. */
- FPC_ERROR_INTERNAL_18 = 18, /* Capture type specified is invalid. */
- FPC_ERROR_INTERNAL_19 = 19, /* Capture config specified is invalid. */
- FPC_ERROR_INTERNAL_20 = 20, /* Sensor type in hw desc could not be extracted. */
- FPC_ERROR_INTERNAL_21 = 21, /* Failed to create BNC component. */
- FPC_ERROR_INTERNAL_22 = 22, /* BN calibration failed. */
- FPC_ERROR_INTERNAL_23 = 23, /* BN memory allocation failed. */
- FPC_ERROR_INTERNAL_24 = 24, /* Companion type in hw desc could not be extracted. */
- FPC_ERROR_INTERNAL_25 = 25, /* Coating type in hw desc could not be extracted. */
- FPC_ERROR_INTERNAL_26 = 26, /* Sensor mode type is invalid. */
- FPC_ERROR_INTERNAL_27 = 27, /* Wrong Sensor state in OTP read. */
- FPC_ERROR_INTERNAL_28 = 28, /* Mismatch of register size in overlay vs rrs. */
- FPC_ERROR_INTERNAL_29 = 29, /* Checkerboard capture failed. */
- FPC_ERROR_INTERNAL_30 = 30, /* Error converting to fpc_image in dp calibration. */
- FPC_ERROR_INTERNAL_31 = 31, /* Failed to capture reset pixel image. */
- FPC_ERROR_INTERNAL_32 = 32, /* API level not support in dp calibration. */
- FPC_ERROR_INTERNAL_33 = 33, /* The image data in parameter is invalid. */
- FPC_ERROR_INTERNAL_34 = 34, /* PAL delay function has failed. */
- FPC_ERROR_INTERNAL_35 = 35, /* AFD sensor commad did not complete. */
- FPC_ERROR_INTERNAL_36 = 36, /* AFD wrong runlevel detected after calibration. */
- FPC_ERROR_INTERNAL_37 = 37, /* Wrong rrs size. */
- FPC_ERROR_INTERNAL_38 = 38, /* There was a finger on the sensor when calibrating finger detect. */
- FPC_ERROR_INTERNAL_39 = 39, /* The calculated calibration value is larger than max. */
- FPC_ERROR_INTERNAL_40 = 40, /* The sensor fifo always underflows */
- FPC_ERROR_INTERNAL_41 = 41, /* The oscillator calibration resulted in a too high or low value */
- FPC_ERROR_INTERNAL_42 = 42, /* Sensor driver was opened with NULL configuration */
- FPC_ERROR_INTERNAL_43 = 43, /* Sensor driver as opened with NULL hw descriptor */
- FPC_ERROR_INTERNAL_44 = 44, /* Error occured during image drive test */
+ FPC_ERROR_INTERNAL_0 = 0, /* Indicates that no internal code was set. */
+ FPC_ERROR_INTERNAL_1 = 1, /* Not supported by sensor. */
+ FPC_ERROR_INTERNAL_2 = 2, /* Sensor got a NULL response (from other
+ module). */
+ FPC_ERROR_INTERNAL_3 = 3, /* Runtime config not supported by firmware.
+ */
+ FPC_ERROR_INTERNAL_4 = 4, /* CAC has not been created. */
+ FPC_ERROR_INTERNAL_5 = 5, /* CAC returned an error to the sensor. */
+ FPC_ERROR_INTERNAL_6 = 6, /* CAC fasttap image capture failed. */
+ FPC_ERROR_INTERNAL_7 = 7, /* CAC fasttap image capture failed. */
+ FPC_ERROR_INTERNAL_8 = 8, /* CAC Simple image capture failed. */
+ FPC_ERROR_INTERNAL_9 = 9, /* CAC custom image capture failed. */
+ FPC_ERROR_INTERNAL_10 = 10, /* CAC MQT image capture failed. */
+ FPC_ERROR_INTERNAL_11 = 11, /* CAC PN image capture failed. */
+ FPC_ERROR_INTERNAL_12 = 12, /* Reading CAC context size. */
+ FPC_ERROR_INTERNAL_13 = 13, /* Reading CAC context size. */
+ FPC_ERROR_INTERNAL_14 = 14, /* Sensor context invalid. */
+ FPC_ERROR_INTERNAL_15 = 15, /* Buffer reference is invalid. */
+ FPC_ERROR_INTERNAL_16 = 16, /* Buffer size reference is invalid. */
+ FPC_ERROR_INTERNAL_17 = 17, /* Image data reference is invalid. */
+ FPC_ERROR_INTERNAL_18 = 18, /* Capture type specified is invalid. */
+ FPC_ERROR_INTERNAL_19 = 19, /* Capture config specified is invalid. */
+ FPC_ERROR_INTERNAL_20 = 20, /* Sensor type in hw desc could not be
+ extracted. */
+ FPC_ERROR_INTERNAL_21 = 21, /* Failed to create BNC component. */
+ FPC_ERROR_INTERNAL_22 = 22, /* BN calibration failed. */
+ FPC_ERROR_INTERNAL_23 = 23, /* BN memory allocation failed. */
+ FPC_ERROR_INTERNAL_24 = 24, /* Companion type in hw desc could not be
+ extracted. */
+ FPC_ERROR_INTERNAL_25 = 25, /* Coating type in hw desc could not be
+ extracted. */
+ FPC_ERROR_INTERNAL_26 = 26, /* Sensor mode type is invalid. */
+ FPC_ERROR_INTERNAL_27 = 27, /* Wrong Sensor state in OTP read. */
+ FPC_ERROR_INTERNAL_28 = 28, /* Mismatch of register size in overlay vs
+ rrs. */
+ FPC_ERROR_INTERNAL_29 = 29, /* Checkerboard capture failed. */
+ FPC_ERROR_INTERNAL_30 = 30, /* Error converting to fpc_image in dp
+ calibration. */
+ FPC_ERROR_INTERNAL_31 = 31, /* Failed to capture reset pixel image. */
+ FPC_ERROR_INTERNAL_32 = 32, /* API level not support in dp calibration.
+ */
+ FPC_ERROR_INTERNAL_33 = 33, /* The image data in parameter is invalid.
+ */
+ FPC_ERROR_INTERNAL_34 = 34, /* PAL delay function has failed. */
+ FPC_ERROR_INTERNAL_35 = 35, /* AFD sensor commad did not complete. */
+ FPC_ERROR_INTERNAL_36 = 36, /* AFD wrong runlevel detected after
+ calibration. */
+ FPC_ERROR_INTERNAL_37 = 37, /* Wrong rrs size. */
+ FPC_ERROR_INTERNAL_38 = 38, /* There was a finger on the sensor when
+ calibrating finger detect. */
+ FPC_ERROR_INTERNAL_39 = 39, /* The calculated calibration value is
+ larger than max. */
+ FPC_ERROR_INTERNAL_40 = 40, /* The sensor fifo always underflows */
+ FPC_ERROR_INTERNAL_41 = 41, /* The oscillator calibration resulted in a
+ too high or low value */
+ FPC_ERROR_INTERNAL_42 = 42, /* Sensor driver was opened with NULL
+ configuration */
+ FPC_ERROR_INTERNAL_43 = 43, /* Sensor driver as opened with NULL hw
+ descriptor */
+ FPC_ERROR_INTERNAL_44 = 44, /* Error occured during image drive test */
};
/* FPC specific initialization function to fill their context */
diff --git a/driver/fingerprint/fpc/libfp/fpc_sensor_pal.c b/driver/fingerprint/fpc/libfp/fpc_sensor_pal.c
index 35c07b464a..c0578bc09b 100644
--- a/driver/fingerprint/fpc/libfp/fpc_sensor_pal.c
+++ b/driver/fingerprint/fpc/libfp/fpc_sensor_pal.c
@@ -1,4 +1,4 @@
-/* Copyright 2017 The Chromium OS Authors. All rights reserved.
+/* Copyright 2017 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -14,8 +14,8 @@
#include "uart.h"
#include "util.h"
-#define CPRINTF(format, args...) cprintf(CC_FP, format, ## args)
-#define CPRINTS(format, args...) cprints(CC_FP, format, ## args)
+#define CPRINTF(format, args...) cprintf(CC_FP, format, ##args)
+#define CPRINTS(format, args...) cprints(CC_FP, format, ##args)
void fpc_pal_log_entry(const char *tag, int log_level, const char *format, ...)
{
diff --git a/driver/fingerprint/fpc/libfp/fpc_sensor_pal.h b/driver/fingerprint/fpc/libfp/fpc_sensor_pal.h
index 78376863f1..844f1d7498 100644
--- a/driver/fingerprint/fpc/libfp/fpc_sensor_pal.h
+++ b/driver/fingerprint/fpc/libfp/fpc_sensor_pal.h
@@ -1,4 +1,4 @@
-/* Copyright 2017 The Chromium OS Authors. All rights reserved.
+/* Copyright 2017 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -14,8 +14,10 @@ typedef void *fpc_device_t;
* @brief Used to describe an interrupt
*/
typedef enum {
- IRQ_INT_TRIG = 0x01, /**< Internally triggered by sensor (fast interrupt) **/
- IRQ_EXT_TRIG = 0x02 /**< Externally triggered by event outside sensor (may take long time) **/
+ IRQ_INT_TRIG = 0x01, /**< Internally triggered by sensor (fast
+ interrupt) **/
+ IRQ_EXT_TRIG = 0x02 /**< Externally triggered by event outside sensor
+ (may take long time) **/
} fpc_pal_irq_t;
/**
@@ -109,9 +111,9 @@ int fpc_pal_spi_get_speed_hz(fpc_device_t device, uint32_t *speed_hz);
* @param[in] ... additional arguments.
*
*/
-#define FPC_SENSOR_SDK_LOG_LEVEL_DEBUG (1)
-#define FPC_SENSOR_SDK_LOG_LEVEL_INFO (2)
-#define FPC_SENSOR_SDK_LOG_LEVEL_ERROR (3)
+#define FPC_SENSOR_SDK_LOG_LEVEL_DEBUG (1)
+#define FPC_SENSOR_SDK_LOG_LEVEL_INFO (2)
+#define FPC_SENSOR_SDK_LOG_LEVEL_ERROR (3)
#define FPC_SENSOR_SDK_LOG_LEVEL_DISABLED (4)
void fpc_pal_log_entry(const char *tag, int log_level, const char *format, ...);
diff --git a/driver/fingerprint/fpsensor.h b/driver/fingerprint/fpsensor.h
index ac7e31fb6a..83e3143a55 100644
--- a/driver/fingerprint/fpsensor.h
+++ b/driver/fingerprint/fpsensor.h
@@ -1,4 +1,4 @@
-/* Copyright 2019 The Chromium OS Authors. All rights reserved.
+/* Copyright 2019 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/