mfd: cros_ec: Add fingerprint API
Add support for fingerprint sensors managed by embedded controller. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> 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: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
parent
784dd15c93
commit
716bf50ea8
@ -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 */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user