media: cec: add core support for low-level CEC pin monitoring

Add support for the new MONITOR_PIN mode.

Add the cec_pin_event function that the CEC pin code will call to queue pin
change events.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reviewed-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Hans Verkuil
2017-07-11 03:30:41 -03:00
committed by Mauro Carvalho Chehab
parent fdb8c88e92
commit b8d62f50b1
3 changed files with 40 additions and 2 deletions
+11
View File
@@ -177,6 +177,7 @@ struct cec_adapter {
bool is_configuring;
bool is_configured;
u32 monitor_all_cnt;
u32 monitor_pin_cnt;
u32 follower_cnt;
struct cec_fh *cec_follower;
struct cec_fh *cec_initiator;
@@ -271,6 +272,16 @@ static inline void cec_received_msg(struct cec_adapter *adap,
cec_received_msg_ts(adap, msg, ktime_get());
}
/**
* cec_queue_pin_event() - queue a pin event with a given timestamp.
*
* @adap: pointer to the cec adapter
* @is_high: when true the pin is high, otherwise it is low
* @ts: the timestamp for this event
*
*/
void cec_queue_pin_event(struct cec_adapter *adap, bool is_high, ktime_t ts);
/**
* cec_get_edid_phys_addr() - find and return the physical address
*