1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Chromium OS Matrix Keyboard Message Protocol definitions
4  *
5  * Copyright (c) 2012 The Chromium OS Authors.
6  */
7 
8 #ifndef _CROS_MESSAGE_H
9 #define _CROS_MESSAGE_H
10 
11 /*
12  * Command interface between EC and AP, for LPC, I2C and SPI interfaces.
13  *
14  * This is copied from the Chromium OS Open Source Embedded Controller code.
15  */
16 enum {
17 	/* The header byte, which follows the preamble */
18 	MSG_HEADER	= 0xec,
19 
20 	MSG_HEADER_BYTES	= 3,
21 	MSG_TRAILER_BYTES	= 2,
22 	MSG_PROTO_BYTES		= MSG_HEADER_BYTES + MSG_TRAILER_BYTES,
23 
24 	/* Max length of messages */
25 	MSG_BYTES		= EC_PROTO2_MAX_PARAM_SIZE + MSG_PROTO_BYTES,
26 };
27 
28 #endif
29