diff options
author | Reka Norman <rekanorman@chromium.org> | 2023-08-25 12:44:01 +1000 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-09-27 09:39:55 +0200 |
commit | 5d227f02ceb9cc120cf04efbd77e12da182a5f62 (patch) | |
tree | fe2f5fa5a53cd547f50b43275570397c4828a6c0 /include | |
parent | e7885b9c6564dc39b55f546b4a4afa0a44bb0be5 (diff) | |
download | linux-stable-5d227f02ceb9cc120cf04efbd77e12da182a5f62.tar.gz linux-stable-5d227f02ceb9cc120cf04efbd77e12da182a5f62.tar.bz2 linux-stable-5d227f02ceb9cc120cf04efbd77e12da182a5f62.zip |
media: cros-ec-cec: Get number of CEC ports from EC
Add a new CEC port count host command and use it to query the number of
CEC ports from the EC. If the host command is not supported then it must
be old EC firmware which only supports one port, so fall back to
assuming one port.
This patch completes support for multiple ports in cros-ec-cec.
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/platform_data/cros_ec_commands.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/platform_data/cros_ec_commands.h b/include/linux/platform_data/cros_ec_commands.h index ad61c7ff0b28..7dae17b62a4d 100644 --- a/include/linux/platform_data/cros_ec_commands.h +++ b/include/linux/platform_data/cros_ec_commands.h @@ -4536,6 +4536,17 @@ struct ec_response_cec_get { uint8_t val; } __ec_align1; +/* Get the number of CEC ports */ +#define EC_CMD_CEC_PORT_COUNT 0x00C1 + +/** + * struct ec_response_cec_port_count - CEC port count response + * @port_count: number of CEC ports + */ +struct ec_response_cec_port_count { + uint8_t port_count; +} __ec_align1; + /* CEC parameters command */ enum cec_command { /* CEC reading, writing and events enable */ |