From 69e3235d58260d3d03570271da314829f9486237 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 9 Oct 2019 11:49:19 -0300 Subject: 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 Signed-off-by: Mauro Carvalho Chehab --- include/media/cec-pin.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'include/media') 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); }; /** -- cgit