media: cros-ec-cec: Get number of CEC ports from EC
authorReka Norman <rekanorman@chromium.org>
Fri, 25 Aug 2023 02:44:01 +0000 (12:44 +1000)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 27 Sep 2023 07:39:55 +0000 (09:39 +0200)
commit5d227f02ceb9cc120cf04efbd77e12da182a5f62
treefe2f5fa5a53cd547f50b43275570397c4828a6c0
parente7885b9c6564dc39b55f546b4a4afa0a44bb0be5
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>
drivers/media/cec/platform/cros-ec/cros-ec-cec.c
include/linux/platform_data/cros_ec_commands.h