Linux 4.16.11
[linux/fpc-iii.git] / drivers / media / cec / cec-priv.h
blobdaf597643af8b2526eea080b9ca5b0ce5c7f0319
1 /*
2 * cec-priv.h - HDMI Consumer Electronics Control internal header
4 * Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
6 * This program is free software; you may redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; version 2 of the License.
10 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
11 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
12 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
13 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
14 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
15 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
16 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
17 * SOFTWARE.
20 #ifndef _CEC_PRIV_H
21 #define _CEC_PRIV_H
23 #include <linux/cec-funcs.h>
24 #include <media/cec.h>
26 #define dprintk(lvl, fmt, arg...) \
27 do { \
28 if (lvl <= cec_debug) \
29 pr_info("cec-%s: " fmt, adap->name, ## arg); \
30 } while (0)
32 /* devnode to cec_adapter */
33 #define to_cec_adapter(node) container_of(node, struct cec_adapter, devnode)
35 /* cec-core.c */
36 extern int cec_debug;
37 int cec_get_device(struct cec_devnode *devnode);
38 void cec_put_device(struct cec_devnode *devnode);
40 /* cec-adap.c */
41 int cec_monitor_all_cnt_inc(struct cec_adapter *adap);
42 void cec_monitor_all_cnt_dec(struct cec_adapter *adap);
43 int cec_monitor_pin_cnt_inc(struct cec_adapter *adap);
44 void cec_monitor_pin_cnt_dec(struct cec_adapter *adap);
45 int cec_adap_status(struct seq_file *file, void *priv);
46 int cec_thread_func(void *_adap);
47 void __cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block);
48 int __cec_s_log_addrs(struct cec_adapter *adap,
49 struct cec_log_addrs *log_addrs, bool block);
50 int cec_transmit_msg_fh(struct cec_adapter *adap, struct cec_msg *msg,
51 struct cec_fh *fh, bool block);
52 void cec_queue_event_fh(struct cec_fh *fh,
53 const struct cec_event *new_ev, u64 ts);
55 /* cec-api.c */
56 extern const struct file_operations cec_devnode_fops;
58 #endif