提交 0aa877c5 编写于 作者: N Nicolas Boichat 提交者: Benson Leung

mfd: cros_ec: Add EC console read structures definitions

ec_params_console_read_v1 is used to capture EC logs from kernel,
and ec_params_get_cmd_versions_v1 is used to probe whether EC
supports that command.
Signed-off-by: NNicolas Boichat <drinkcat@chromium.org>
Reviewed-by: NGuenter Roeck <groeck@chromium.org>
Acked-by: NLee Jones <lee.jones@linaro.org>
Tested-by: NEnric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: NBenson Leung <bleung@chromium.org>
上级 68c35ea2
...@@ -625,6 +625,10 @@ struct ec_params_get_cmd_versions { ...@@ -625,6 +625,10 @@ struct ec_params_get_cmd_versions {
uint8_t cmd; /* Command to check */ uint8_t cmd; /* Command to check */
} __packed; } __packed;
struct ec_params_get_cmd_versions_v1 {
uint16_t cmd; /* Command to check */
} __packed;
struct ec_response_get_cmd_versions { struct ec_response_get_cmd_versions {
/* /*
* Mask of supported versions; use EC_VER_MASK() to compare with a * Mask of supported versions; use EC_VER_MASK() to compare with a
...@@ -2285,13 +2289,28 @@ struct ec_params_charge_control { ...@@ -2285,13 +2289,28 @@ struct ec_params_charge_control {
#define EC_CMD_CONSOLE_SNAPSHOT 0x97 #define EC_CMD_CONSOLE_SNAPSHOT 0x97
/* /*
* Read next chunk of data from saved snapshot. * Read data from the saved snapshot. If the subcmd parameter is
* CONSOLE_READ_NEXT, this will return data starting from the beginning of
* the latest snapshot. If it is CONSOLE_READ_RECENT, it will start from the
* end of the previous snapshot.
*
* The params are only looked at in version >= 1 of this command. Prior
* versions will just default to CONSOLE_READ_NEXT behavior.
* *
* Response is null-terminated string. Empty string, if there is no more * Response is null-terminated string. Empty string, if there is no more
* remaining output. * remaining output.
*/ */
#define EC_CMD_CONSOLE_READ 0x98 #define EC_CMD_CONSOLE_READ 0x98
enum ec_console_read_subcmd {
CONSOLE_READ_NEXT = 0,
CONSOLE_READ_RECENT
};
struct ec_params_console_read_v1 {
uint8_t subcmd; /* enum ec_console_read_subcmd */
} __packed;
/*****************************************************************************/ /*****************************************************************************/
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册