media: cros-ec-cec: Support receiving messages from multiple ports
authorReka Norman <rekanorman@chromium.org>
Fri, 25 Aug 2023 02:43:59 +0000 (12:43 +1000)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 27 Sep 2023 07:39:54 +0000 (09:39 +0200)
commit425d20518c54bc6d66d733fb117a9a4046932d50
treee18d8bf674d3545c616650b587cdd109fca44287
parent1cabf52639d16428bc0d61028dcaf38e29c5f3b5
media: cros-ec-cec: Support receiving messages from multiple ports

Currently, received messages are sent from the EC in the cec_message
MKBP event. Since the size of ec_response_get_next_data_v1 is 16 bytes,
which is also the maximum size of a CEC message, there is no space to
add a port parameter. Increasing the size of
ec_response_get_next_data_v1 is an option, but this would increase
EC-kernel traffic for all MKBP event types.

Instead, use an event to notify that data is ready, and add a new read
command to read the data.

For backwards compatibility with old EC firmware, continue to handle
cec_message events as well.

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