diff options
| author | Gwendal Grignou <gwendal@chromium.org> | 2019-06-03 14:33:51 -0400 |
|---|---|---|
| committer | Lee Jones <lee.jones@linaro.org> | 2019-06-10 04:15:08 -0400 |
| commit | fd5372848a6fab0f4ec80c554f384cb1a8c19bb7 (patch) | |
| tree | 581ea6c8ef6d10b049dee367e0fb66b0fde199fe /include/linux/mfd | |
| parent | e16efdf12105d921b44b78a0012acf2487f3245b (diff) | |
mfd: cros_ec: Add API for keyboard testing
Add command to allow keyboard testing in factory.
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>
Diffstat (limited to 'include/linux/mfd')
| -rw-r--r-- | include/linux/mfd/cros_ec_commands.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/mfd/cros_ec_commands.h b/include/linux/mfd/cros_ec_commands.h index e05cdcb12481..cc054a0a4c4c 100644 --- a/include/linux/mfd/cros_ec_commands.h +++ b/include/linux/mfd/cros_ec_commands.h | |||
| @@ -3142,6 +3142,17 @@ struct ec_params_mkbp_simulate_key { | |||
| 3142 | uint8_t pressed; | 3142 | uint8_t pressed; |
| 3143 | } __ec_align1; | 3143 | } __ec_align1; |
| 3144 | 3144 | ||
| 3145 | #define EC_CMD_GET_KEYBOARD_ID 0x0063 | ||
| 3146 | |||
| 3147 | struct ec_response_keyboard_id { | ||
| 3148 | uint32_t keyboard_id; | ||
| 3149 | } __ec_align4; | ||
| 3150 | |||
| 3151 | enum keyboard_id { | ||
| 3152 | KEYBOARD_ID_UNSUPPORTED = 0, | ||
| 3153 | KEYBOARD_ID_UNREADABLE = 0xffffffff, | ||
| 3154 | }; | ||
| 3155 | |||
| 3145 | /* Configure keyboard scanning */ | 3156 | /* Configure keyboard scanning */ |
| 3146 | #define EC_CMD_MKBP_SET_CONFIG 0x0064 | 3157 | #define EC_CMD_MKBP_SET_CONFIG 0x0064 |
| 3147 | #define EC_CMD_MKBP_GET_CONFIG 0x0065 | 3158 | #define EC_CMD_MKBP_GET_CONFIG 0x0065 |
| @@ -3390,6 +3401,13 @@ struct ec_response_get_next_event_v1 { | |||
| 3390 | #define EC_MKBP_TABLET_MODE 1 | 3401 | #define EC_MKBP_TABLET_MODE 1 |
| 3391 | #define EC_MKBP_BASE_ATTACHED 2 | 3402 | #define EC_MKBP_BASE_ATTACHED 2 |
| 3392 | 3403 | ||
| 3404 | /* Run keyboard factory test scanning */ | ||
| 3405 | #define EC_CMD_KEYBOARD_FACTORY_TEST 0x0068 | ||
| 3406 | |||
| 3407 | struct ec_response_keyboard_factory_test { | ||
| 3408 | uint16_t shorted; /* Keyboard pins are shorted */ | ||
| 3409 | } __ec_align2; | ||
| 3410 | |||
| 3393 | /* Fingerprint events in 'fp_events' for EC_MKBP_EVENT_FINGERPRINT */ | 3411 | /* Fingerprint events in 'fp_events' for EC_MKBP_EVENT_FINGERPRINT */ |
| 3394 | #define EC_MKBP_FP_RAW_EVENT(fp_events) ((fp_events) & 0x00FFFFFF) | 3412 | #define EC_MKBP_FP_RAW_EVENT(fp_events) ((fp_events) & 0x00FFFFFF) |
| 3395 | #define EC_MKBP_FP_ERRCODE(fp_events) ((fp_events) & 0x0000000F) | 3413 | #define EC_MKBP_FP_ERRCODE(fp_events) ((fp_events) & 0x0000000F) |
