summaryrefslogtreecommitdiff
path: root/drivers/media/cec
diff options
context:
space:
mode:
authorReka Norman <rekanorman@chromium.org>2023-08-25 12:43:56 +1000
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2023-09-27 09:39:54 +0200
commite90bd1fe7cda1aa267fe683e392b4433ec2dc0d3 (patch)
tree4096eff23a1952a2be7b800dbdb6eb1ceb0989cc /drivers/media/cec
parent4d0e179a42879f7d76a5b95a2e7e7a5afa33954a (diff)
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>
Diffstat (limited to 'drivers/media/cec')
-rw-r--r--drivers/media/cec/platform/cros-ec/cros-ec-cec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
index d76a25ae0cf1..e969031e1e0e 100644
--- a/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
+++ b/drivers/media/cec/platform/cros-ec/cros-ec-cec.c
@@ -118,6 +118,7 @@ static int cros_ec_cec_set_log_addr(struct cec_adapter *adap, u8 logical_addr)
struct cros_ec_device *cros_ec = cros_ec_cec->cros_ec;
struct ec_params_cec_set params = {
.cmd = CEC_CMD_LOGICAL_ADDRESS,
+ .port = port->port_num,
.val = logical_addr,
};
int ret;
@@ -162,6 +163,7 @@ static int cros_ec_cec_adap_enable(struct cec_adapter *adap, bool enable)
struct cros_ec_device *cros_ec = cros_ec_cec->cros_ec;
struct ec_params_cec_set params = {
.cmd = CEC_CMD_ENABLE,
+ .port = port->port_num,
.val = enable,
};
int ret;