blob: 804e38f849c7b76abf698dee14eb4b0e7f4aceb9 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/* 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.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/* devnode to cec_adapter */
21#define to_cec_adapter(node) container_of(node, struct cec_adapter, devnode)
22
23/* cec-core.c */
24extern int cec_debug;
25int cec_get_device(struct cec_devnode *devnode);
26void cec_put_device(struct cec_devnode *devnode);
27
28/* cec-adap.c */
29int cec_monitor_all_cnt_inc(struct cec_adapter *adap);
30void cec_monitor_all_cnt_dec(struct cec_adapter *adap);
31int cec_monitor_pin_cnt_inc(struct cec_adapter *adap);
32void cec_monitor_pin_cnt_dec(struct cec_adapter *adap);
33int cec_adap_status(struct seq_file *file, void *priv);
34int cec_thread_func(void *_adap);
35void __cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block);
36int __cec_s_log_addrs(struct cec_adapter *adap,
37 struct cec_log_addrs *log_addrs, bool block);
38int cec_transmit_msg_fh(struct cec_adapter *adap, struct cec_msg *msg,
39 struct cec_fh *fh, bool block);
40void cec_queue_event_fh(struct cec_fh *fh,
41 const struct cec_event *new_ev, u64 ts);
42
43/* cec-api.c */
44extern const struct file_operations cec_devnode_fops;
45
46#endif