All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gwendal Grignou <gwendal@chromium.org>
To: enric.balletbo@collabora.com, bleung@chromium.org,
	groeck@chromium.org, lee.jones@linaro.org, jic23@kernel.org,
	broonie@kernel.org, cychiang@chromium.org, tiwai@suse.com,
	fabien.lahoudere@collabora.com
Cc: linux-iio@vger.kernel.org, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org,
	Gwendal Grignou <gwendal@chromium.org>
Subject: [RESEND PATCH v3 17/30] mfd: cros_ec: Add fingerprint API
Date: Mon,  3 Jun 2019 11:33:48 -0700	[thread overview]
Message-ID: <20190603183401.151408-18-gwendal@chromium.org> (raw)
In-Reply-To: <20190603183401.151408-1-gwendal@chromium.org>

Add support for fingerprint sensors managed by embedded controller.

Acked-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: Benson Leung <bleung@chromium.org>
Reviewed-by: Fabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
---
 include/linux/mfd/cros_ec_commands.h | 34 ++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h
index 51fe65170ce6..d5d07a9957ec 100644
--- a/include/linux/mfd/cros_ec_commands.h
+++ b/include/linux/mfd/cros_ec_commands.h
@@ -3339,6 +3339,40 @@ struct ec_response_get_next_event_v1 {
 #define EC_MKBP_TABLET_MODE	1
 #define EC_MKBP_BASE_ATTACHED	2
 
+/* Fingerprint events in 'fp_events' for EC_MKBP_EVENT_FINGERPRINT */
+#define EC_MKBP_FP_RAW_EVENT(fp_events) ((fp_events) & 0x00FFFFFF)
+#define EC_MKBP_FP_ERRCODE(fp_events)   ((fp_events) & 0x0000000F)
+#define EC_MKBP_FP_ENROLL_PROGRESS_OFFSET 4
+#define EC_MKBP_FP_ENROLL_PROGRESS(fpe) (((fpe) & 0x00000FF0) \
+					 >> EC_MKBP_FP_ENROLL_PROGRESS_OFFSET)
+#define EC_MKBP_FP_MATCH_IDX_OFFSET 12
+#define EC_MKBP_FP_MATCH_IDX_MASK 0x0000F000
+#define EC_MKBP_FP_MATCH_IDX(fpe) (((fpe) & EC_MKBP_FP_MATCH_IDX_MASK) \
+					 >> EC_MKBP_FP_MATCH_IDX_OFFSET)
+#define EC_MKBP_FP_ENROLL               BIT(27)
+#define EC_MKBP_FP_MATCH                BIT(28)
+#define EC_MKBP_FP_FINGER_DOWN          BIT(29)
+#define EC_MKBP_FP_FINGER_UP            BIT(30)
+#define EC_MKBP_FP_IMAGE_READY          BIT(31)
+/* code given by EC_MKBP_FP_ERRCODE() when EC_MKBP_FP_ENROLL is set */
+#define EC_MKBP_FP_ERR_ENROLL_OK               0
+#define EC_MKBP_FP_ERR_ENROLL_LOW_QUALITY      1
+#define EC_MKBP_FP_ERR_ENROLL_IMMOBILE         2
+#define EC_MKBP_FP_ERR_ENROLL_LOW_COVERAGE     3
+#define EC_MKBP_FP_ERR_ENROLL_INTERNAL         5
+/* Can be used to detect if image was usable for enrollment or not. */
+#define EC_MKBP_FP_ERR_ENROLL_PROBLEM_MASK     1
+/* code given by EC_MKBP_FP_ERRCODE() when EC_MKBP_FP_MATCH is set */
+#define EC_MKBP_FP_ERR_MATCH_NO                0
+#define EC_MKBP_FP_ERR_MATCH_NO_INTERNAL       6
+#define EC_MKBP_FP_ERR_MATCH_NO_TEMPLATES      7
+#define EC_MKBP_FP_ERR_MATCH_NO_LOW_QUALITY    2
+#define EC_MKBP_FP_ERR_MATCH_NO_LOW_COVERAGE   4
+#define EC_MKBP_FP_ERR_MATCH_YES               1
+#define EC_MKBP_FP_ERR_MATCH_YES_UPDATED       3
+#define EC_MKBP_FP_ERR_MATCH_YES_UPDATE_FAILED 5
+
+
 /*****************************************************************************/
 /* Temperature sensor commands */
 
-- 
2.21.0.1020.gf2820cf01a-goog


  parent reply	other threads:[~2019-06-03 18:34 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-03 18:33 [RESEND PATCH v3 00/30] Update cros_ec_commands.h Gwendal Grignou
2019-06-03 18:33 ` Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 01/30] mfd: cros_ec: Update license term Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 02/30] mfd: cros_ec: Zero BUILD_ macro Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 03/30] mfd: cros_ec: set comments properly Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 04/30] mfd: cros_ec: add ec_align macros Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 05/30] mfd: cros_ec: Define commands as 4-digit UPPER CASE hex values Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 06/30] mfd: cros_ec: use BIT macro Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 07/30] mfd: cros_ec: Update ACPI interface definition Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 08/30] mfd: cros_ec: move HDMI CEC API definition Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 09/30] mfd: cros_ec: Remove zero-size structs Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 10/30] mfd: cros_ec: Add Flash V2 commands API Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 11/30] mfd: cros_ec: Add PWM_SET_DUTY API Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 12/30] mfd: cros_ec: Add lightbar v2 API Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 13/30] mfd: cros_ec: Expand hash API Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 14/30] mfd: cros_ec: Add EC transport protocol v4 Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 15/30] mfd: cros_ec: Complete MEMS sensor API Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 16/30] mfd: cros_ec: Fix event processing API Gwendal Grignou
2019-06-03 18:33 ` Gwendal Grignou [this message]
2019-06-03 18:33 ` [RESEND PATCH v3 18/30] mfd: cros_ec: Fix temperature API Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 19/30] mfd: cros_ec: Complete Power and USB PD API Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 20/30] mfd: cros_ec: Add API for keyboard testing Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 21/30] mfd: cros_ec: Add Hibernate API Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 22/30] mfd: cros_ec: Add Smart Battery Firmware update API Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 23/30] mfd: cros_ec: Add I2C passthru protection API Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 24/30] mfd: cros_ec: Add API for EC-EC communication Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 25/30] mfd: cros_ec: Add API for Touchpad support Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 26/30] mfd: cros_ec: Add API for Fingerprint support Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 27/30] mfd: cros_ec: Add API for rwsig Gwendal Grignou
2019-06-03 18:33 ` [RESEND PATCH v3 28/30] mfd: cros_ec: Add SKU ID and Secure storage API Gwendal Grignou
2019-06-03 18:34 ` [RESEND PATCH v3 29/30] mfd: cros_ec: Add Management API entry points Gwendal Grignou
2019-06-03 18:34 ` [RESEND PATCH v3 30/30] mfd: cros_ec: Update I2S API Gwendal Grignou
2019-06-03 19:42 ` [RESEND PATCH v3 00/30] Update cros_ec_commands.h Mark Brown
2019-06-04  5:47   ` Lee Jones
2019-06-04  5:59 ` Lee Jones
2019-06-06 11:25   ` [alsa-devel] " Enric Balletbo Serra
2019-06-10  8:20     ` [GIT PULL] Immutable branch between MFD and Cros due for the v5.3 merge window Lee Jones
2019-06-10  8:45       ` Enric Balletbo Serra
2019-06-10  8:57         ` Lee Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190603183401.151408-18-gwendal@chromium.org \
    --to=gwendal@chromium.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bleung@chromium.org \
    --cc=broonie@kernel.org \
    --cc=cychiang@chromium.org \
    --cc=enric.balletbo@collabora.com \
    --cc=fabien.lahoudere@collabora.com \
    --cc=groeck@chromium.org \
    --cc=jic23@kernel.org \
    --cc=lee.jones@linaro.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.