media: cros-ec-cec: Support multiple ports in set/get host commands
authorReka Norman <rekanorman@chromium.org>
Fri, 25 Aug 2023 02:43:56 +0000 (12:43 +1000)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 27 Sep 2023 07:39:54 +0000 (09:39 +0200)
commite90bd1fe7cda1aa267fe683e392b4433ec2dc0d3
tree4096eff23a1952a2be7b800dbdb6eb1ceb0989cc
parent4d0e179a42879f7d76a5b95a2e7e7a5afa33954a
media: cros-ec-cec: Support multiple ports in set/get host commands

Reuse the top four bits of the cmd field to specify the port number.
The reason for doing this as opposed to adding a separate uint8_t field
is it avoids the need to add new versions of these commands. The change
is backwards compatible since these bits were previously always zero, so
the default behaviour is to always operate on port 0.

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