cec-priv.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * cec-priv.h - HDMI Consumer Electronics Control internal header
  3. *
  4. * Copyright 2016 Cisco Systems, Inc. and/or its affiliates. All rights reserved.
  5. *
  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.
  9. *
  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.
  18. */
  19. #ifndef _CEC_PRIV_H
  20. #define _CEC_PRIV_H
  21. #include <linux/cec-funcs.h>
  22. #include <media/cec.h>
  23. #define dprintk(lvl, fmt, arg...) \
  24. do { \
  25. if (lvl <= cec_debug) \
  26. pr_info("cec-%s: " fmt, adap->name, ## arg); \
  27. } while (0)
  28. /* devnode to cec_adapter */
  29. #define to_cec_adapter(node) container_of(node, struct cec_adapter, devnode)
  30. /* cec-core.c */
  31. extern int cec_debug;
  32. int cec_get_device(struct cec_devnode *devnode);
  33. void cec_put_device(struct cec_devnode *devnode);
  34. /* cec-adap.c */
  35. int cec_monitor_all_cnt_inc(struct cec_adapter *adap);
  36. void cec_monitor_all_cnt_dec(struct cec_adapter *adap);
  37. int cec_adap_status(struct seq_file *file, void *priv);
  38. int cec_thread_func(void *_adap);
  39. void __cec_s_phys_addr(struct cec_adapter *adap, u16 phys_addr, bool block);
  40. int __cec_s_log_addrs(struct cec_adapter *adap,
  41. struct cec_log_addrs *log_addrs, bool block);
  42. int cec_transmit_msg_fh(struct cec_adapter *adap, struct cec_msg *msg,
  43. struct cec_fh *fh, bool block);
  44. void cec_queue_event_fh(struct cec_fh *fh,
  45. const struct cec_event *new_ev, u64 ts);
  46. /* cec-api.c */
  47. extern const struct file_operations cec_devnode_fops;
  48. #endif