diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2019-10-09 11:49:19 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-10-24 18:31:24 -0300 |
commit | 69e3235d58260d3d03570271da314829f9486237 (patch) | |
tree | 4e2b9cbfcfafe071f1f32ff402ac058267281362 /include/media | |
parent | 65d270acb2d662c3346793663ac3a759eb4491b8 (diff) | |
download | linux-69e3235d58260d3d03570271da314829f9486237.tar.bz2 |
media: cec-pin: add 'received' callback
Drivers that use the CEC pin framework have no way of processing messages
themselves by providing the 'received' callback. This is present in
cec_ops, but not in cec_pin_ops.
Add support for this callback.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/cec-pin.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/media/cec-pin.h b/include/media/cec-pin.h index 604e79cb6cbf..88c8b016eb09 100644 --- a/include/media/cec-pin.h +++ b/include/media/cec-pin.h @@ -29,8 +29,11 @@ * an error if negative. If NULL or -ENOTTY is returned, * then this is not supported. * - * These operations are used by the cec pin framework to manipulate - * the CEC pin. + * @received: optional. High-level CEC message callback. Allows the driver + * to process CEC messages. + * + * These operations (except for the @received op) are used by the + * cec pin framework to manipulate the CEC pin. */ struct cec_pin_ops { bool (*read)(struct cec_adapter *adap); @@ -42,6 +45,9 @@ struct cec_pin_ops { void (*status)(struct cec_adapter *adap, struct seq_file *file); int (*read_hpd)(struct cec_adapter *adap); int (*read_5v)(struct cec_adapter *adap); + + /* High-level CEC message callback */ + int (*received)(struct cec_adapter *adap, struct cec_msg *msg); }; /** |