1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * cec-priv.h - HDMI Consumer Electronics Control internal header
5 * Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
11 #include <linux/cec-funcs.h>
12 #include <media/cec-notifier.h>
14 #define dprintk(lvl, fmt, arg...) \
16 if (lvl <= cec_debug) \
17 pr_info("cec-%s: " fmt, adap->name, ## arg); \
20 /* devnode to cec_adapter */
21 #define to_cec_adapter(node) container_of(node, struct cec_adapter, devnode)
23 static inline bool msg_is_raw(const struct cec_msg
*msg
)
25 return msg
->flags
& CEC_MSG_FL_RAW
;
30 int cec_get_device(struct cec_devnode
*devnode
);
31 void cec_put_device(struct cec_devnode
*devnode
);
34 int cec_monitor_all_cnt_inc(struct cec_adapter
*adap
);
35 void cec_monitor_all_cnt_dec(struct cec_adapter
*adap
);
36 int cec_monitor_pin_cnt_inc(struct cec_adapter
*adap
);
37 void cec_monitor_pin_cnt_dec(struct cec_adapter
*adap
);
38 int cec_adap_status(struct seq_file
*file
, void *priv
);
39 int cec_thread_func(void *_adap
);
40 void __cec_s_phys_addr(struct cec_adapter
*adap
, u16 phys_addr
, bool block
);
41 int __cec_s_log_addrs(struct cec_adapter
*adap
,
42 struct cec_log_addrs
*log_addrs
, bool block
);
43 int cec_transmit_msg_fh(struct cec_adapter
*adap
, struct cec_msg
*msg
,
44 struct cec_fh
*fh
, bool block
);
45 void cec_queue_event_fh(struct cec_fh
*fh
,
46 const struct cec_event
*new_ev
, u64 ts
);
49 extern const struct file_operations cec_devnode_fops
;