summaryrefslogtreecommitdiff
path: root/include/media/cec.h
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2021-11-13 11:05:24 +0000
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-04-24 07:41:06 +0100
commitdad272bd03d541dc7c0ff8331756eccf659f6f02 (patch)
tree55002517ee58b428922c25108f1e09b07e00b67d /include/media/cec.h
parente2ed5024ac2bc27d4bfc99fd58f5ab54de8fa965 (diff)
media: cec: add xfer_timeout_ms field
Allow drivers to change the transmit timeout value, i.e. after how long should a transmit be considered 'lost', i.e. the corresponding cec_transmit_done_ts was never called. Some CEC devices have their own timeout, and so this timeout value must be longer than that hardware timeout value. If it is shorter then the framework would consider the transmit lost, even though it is effectively still in progress at the hardware level. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'include/media/cec.h')
-rw-r--r--include/media/cec.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/media/cec.h b/include/media/cec.h
index 31d704f36707..80340c9eb0f2 100644
--- a/include/media/cec.h
+++ b/include/media/cec.h
@@ -168,6 +168,8 @@ struct cec_adap_ops {
* invalidated while the transmit is ongoing. In that
* case the transmit will finish, but will not retransmit
* and be marked as ABORTED.
+ * @xfer_timeout_ms: the transfer timeout in ms.
+ * If 0, then timeout after 2.1 ms.
* @kthread_config: kthread used to configure a CEC adapter
* @config_completion: used to signal completion of the config kthread
* @kthread: main CEC processing thread
@@ -224,6 +226,7 @@ struct cec_adapter {
struct cec_data *transmitting;
bool transmit_in_progress;
bool transmit_in_progress_aborted;
+ unsigned int xfer_timeout_ms;
struct task_struct *kthread_config;
struct completion config_completion;