File Index
Files and directories
Sign in
FILE

cec-priv.h

File preview with syntax highlighting.

linux-6.19.14/drivers/media/cec/core/cec-priv.h C
 1/* SPDX-License-Identifier: GPL-2.0-only */
 2/*
 3 * cec-priv.h - HDMI Consumer Electronics Control internal header
 4 *
 5 * Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
 6 */
 7
 8#ifndef _CEC_PRIV_H
 9#define _CEC_PRIV_H
10
11#include <linux/cec-funcs.h>
12#include <media/cec-notifier.h>
13
14#define dprintk(lvl, fmt, arg...)					\
15	do {								\
16		if (lvl <= cec_debug)					\
17			pr_info("cec-%s: " fmt, adap->name, ## arg);	\
18	} while (0)
19
20#define call_op(adap, op, arg...)					\
21	((adap->ops->op && !adap->devnode.unregistered) ?		\
22	 adap->ops->op(adap, ## arg) : 0)
23
24#define call_void_op(adap, op, arg...)					\
25	do {								\
26		if (adap->ops->op && !adap->devnode.unregistered)	\
27			adap->ops->op(adap, ## arg);			\
28	} while (0)
29
30/* devnode to cec_adapter */
31#define to_cec_adapter(node) container_of(node, struct cec_adapter, devnode)
32
33static inline bool msg_is_raw(const struct cec_msg *msg)
34{
35	return msg->flags & CEC_MSG_FL_RAW;
36}
37
38/* cec-core.c */
39extern int cec_debug;
40
41/* cec-adap.c */
42int cec_monitor_all_cnt_inc(struct cec_adapter *adap);
43void cec_monitor_all_cnt_dec(struct cec_adapter *adap);
44int cec_monitor_pin_cnt_inc(struct cec_adapter *adap);
45void cec_monitor_pin_cnt_dec(struct cec_adapter *adap);
46int cec_adap_status(struct seq_file *file, void *priv);
47int cec_thread_func(void *_adap);
48int cec_adap_enable(struct cec_adapter *adap);
49void __cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block);
50int __cec_s_log_addrs(struct cec_adapter *adap,
51		      struct cec_log_addrs *log_addrs, bool block);
52int cec_transmit_msg_fh(struct cec_adapter *adap, struct cec_msg *msg,
53			struct cec_fh *fh, bool block);
54void cec_queue_event_fh(struct cec_fh *fh,
55			const struct cec_event *new_ev, u64 ts);
56
57/* cec-api.c */
58extern const struct file_operations cec_devnode_fops;
59
60#endif
~/ Read-only file preview.