History

mfd: cros_ec: Add API for keyboard testing

Add command to allow keyboard testing in factory.

Gwendal Grignou committed 7 years ago

Commit fd537281 parent e16efdf1 file · +18 −0Browse files

Unified · Split

include/linux/mfd/cros_ec_commands.h+18−0
@@ -3142,6 +3142,17 @@ struct ec_params_mkbp_simulate_key { · 3141 unmodified lines
31423142 uint8_t pressed;
31433143 } __ec_align1;
31443144
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+
31453156 /* Configure keyboard scanning */
31463157 #define EC_CMD_MKBP_SET_CONFIG 0x0064
31473158 #define EC_CMD_MKBP_GET_CONFIG 0x0065
@@ -3390,6 +3401,13 @@ struct ec_response_get_next_event_v1 { · 242 unmodified lines
33903401 #define EC_MKBP_TABLET_MODE 1
33913402 #define EC_MKBP_BASE_ATTACHED 2
33923403
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+
33933411 /* Fingerprint events in 'fp_events' for EC_MKBP_EVENT_FINGERPRINT */
33943412 #define EC_MKBP_FP_RAW_EVENT(fp_events) ((fp_events) & 0x00FFFFFF)
33953413 #define EC_MKBP_FP_ERRCODE(fp_events) ((fp_events) & 0x0000000F)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t