cec-priv.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #ifndef _CEC_PRIV_H
  8. #define _CEC_PRIV_H
  9. #include <linux/cec-funcs.h>
  10. #include <media/cec.h>
  11. #define dprintk(lvl, fmt, arg...) \
  12. do { \
  13. if (lvl <= cec_debug) \
  14. pr_info("cec-%s: " fmt, adap->name, ## arg); \
  15. } while (0)
  16. /* devnode to cec_adapter */
  17. #define to_cec_adapter(node) container_of(node, struct cec_adapter, devnode)
  18. /* cec-core.c */
  19. extern int cec_debug;
  20. int cec_get_device(struct cec_devnode *devnode);
  21. void cec_put_device(struct cec_devnode *devnode);
  22. /* cec-adap.c */
  23. int cec_monitor_all_cnt_inc(struct cec_adapter *adap);
  24. void cec_monitor_all_cnt_dec(struct cec_adapter *adap);
  25. int cec_monitor_pin_cnt_inc(struct cec_adapter *adap);
  26. void cec_monitor_pin_cnt_dec(struct cec_adapter *adap);
  27. int cec_adap_status(struct seq_file *file, void *priv);
  28. int cec_thread_func(void *_adap);
  29. void __cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block);
  30. int __cec_s_log_addrs(struct cec_adapter *adap,
  31. struct cec_log_addrs *log_addrs, bool block);
  32. int cec_transmit_msg_fh(struct cec_adapter *adap, struct cec_msg *msg,
  33. struct cec_fh *fh, bool block);
  34. void cec_queue_event_fh(struct cec_fh *fh,
  35. const struct cec_event *new_ev, u64 ts);
  36. /* cec-api.c */
  37. extern const struct file_operations cec_devnode_fops;
  38. #endif