From c94cdc1e0c3589856de9d4ecafeeffdb349a8e0b Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 7 Jun 2017 11:46:10 -0300 Subject: [media] cec: add cec_transmit_attempt_done helper function A simpler variant of cec_transmit_done to be used where the HW does just a single attempt at a transmit. So if the status indicates an error, then the corresponding error count will always be 1 and this function figures that out based on the status argument. Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- include/media/cec.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/media') diff --git a/include/media/cec.h b/include/media/cec.h index 3ce73951591e..a2e184d1df00 100644 --- a/include/media/cec.h +++ b/include/media/cec.h @@ -227,6 +227,12 @@ int cec_transmit_msg(struct cec_adapter *adap, struct cec_msg *msg, /* Called by the adapter */ void cec_transmit_done(struct cec_adapter *adap, u8 status, u8 arb_lost_cnt, u8 nack_cnt, u8 low_drive_cnt, u8 error_cnt); +/* + * Simplified version of cec_transmit_done for hardware that doesn't retry + * failed transmits. So this is always just one attempt in which case + * the status is sufficient. + */ +void cec_transmit_attempt_done(struct cec_adapter *adap, u8 status); void cec_received_msg(struct cec_adapter *adap, struct cec_msg *msg); /** -- cgit v1.2.3