huangcm
2024-08-23 d76fb8c8c6d079a3cee81da7072347dcb8bbbc70
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
///*****************************************
//  Copyright (C) 2009-2019
//  ITE Tech. Inc. All Rights Reserved
//  Proprietary and Confidential
///*****************************************
//   @file   <debug.h>
//   @author Jau-Chih.Tseng@ite.com.tw
//   @date   2019/01/03
//   @fileversion: ITE_HDMITX_SAMPLE_3.27
//******************************************/
#ifndef _DEBUG_H_
#define _DEBUG_H_
 
#include <linux/cdev.h>
#include <linux/device.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/jiffies.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/notifier.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/delay.h>
#include <linux/mutex.h>
#include <linux/sysfs.h>
#include <linux/mod_devicetable.h>
#include <linux/log2.h>
#include <linux/bitops.h>
#include <linux/of.h>
#include <asm/io.h>
#include <linux/irq.h>
#include <linux/gpio.h>
#include <linux/sunxi-gpio.h>
#include <linux/of_gpio.h>
#include <linux/pm_runtime.h>
#include <linux/regulator/consumer.h>
#include <linux/compat.h>
#include <linux/err.h>
 
 
#define Debug_message 0
 
//#pragma message("debug.h")
 
#define printf printk
 
#ifndef Debug_message
#define Debug_message 0
#endif
 
#if Debug_message
 
   #define HDMITX_DEBUG_PRINTF(x)  printf x
   #define HDCP_DEBUG_PRINTF(x)  printf x
   #define EDID_DEBUG_PRINTF(x)  printf x
   #define HDMITX_DEBUG_INFO(x) printf x
#else
   #define HDMITX_DEBUG_PRINTF(x)
   #define HDCP_DEBUG_PRINTF(x)
   #define EDID_DEBUG_PRINTF(x)
   #define HDMITX_DEBUG_INFO(x)
#endif
 
 
#if ( Debug_message & (1 << 1))
   #define HDMITX_DEBUG_PRINTF1(x) printf x
   #define HDCP_DEBUG_PRINTF1(x) printf x
   #define EDID_DEBUG_PRINTF1(x) printf x
#else
   #define HDMITX_DEBUG_PRINTF1(x)
   #define HDCP_DEBUG_PRINTF1(x)
   #define EDID_DEBUG_PRINTF1(x)
#endif
 
#if ( Debug_message & (1 << 2))
   #define HDMITX_DEBUG_PRINTF2(x) printf x
   #define HDCP_DEBUG_PRINTF2(x) printf x
   #define EDID_DEBUG_PRINTF2(x) printf x
#else
   #define HDMITX_DEBUG_PRINTF2(x)
   #define HDCP_DEBUG_PRINTF2(x)
   #define EDID_DEBUG_PRINTF2(x)
#endif
 
#if ( Debug_message & (1 << 3))
   #define HDMITX_DEBUG_PRINTF3(x) printf x
   #define HDCP_DEBUG_PRINTF3(x) printf x
   #define EDID_DEBUG_PRINTF3(x) printf x
#else
   #define HDMITX_DEBUG_PRINTF3(x)
   #define HDCP_DEBUG_PRINTF3(x)
   #define EDID_DEBUG_PRINTF3(x)
#endif
 
#if ( Debug_message & (1 << 4))
   #define HDMITX_DEBUG_PRINTF4(x) printf x
   #define HDCP_DEBUG_PRINTF4(x) printf x
   #define EDID_DEBUG_PRINTF4(x) printf x
#else
   #define HDMITX_DEBUG_PRINTF4(x)
   #define HDCP_DEBUG_PRINTF4(x)
   #define EDID_DEBUG_PRINTF4(x)
#endif
 
#if ( Debug_message & (1 << 5))
   #define HDMITX_DEBUG_PRINTF5(x) printf x
   #define HDCP_DEBUG_PRINTF5(x) printf x
   #define EDID_DEBUG_PRINTF5(x) printf x
#else
   #define HDMITX_DEBUG_PRINTF5(x)
   #define HDCP_DEBUG_PRINTF5(x)
   #define EDID_DEBUG_PRINTF5(x)
#endif
 
#if ( Debug_message & (1 << 6))
   #define HDMITX_DEBUG_PRINTF6(x) printf x
   #define HDCP_DEBUG_PRINTF6(x) printf x
   #define EDID_DEBUG_PRINTF6(x) printf x
#else
   #define HDMITX_DEBUG_PRINTF6(x)
   #define HDCP_DEBUG_PRINTF6(x)
   #define EDID_DEBUG_PRINTF6(x)
#endif
 
#if ( Debug_message & (1 << 7))
   #define HDMITX_DEBUG_PRINTF7(x) printf x
   #define HDCP_DEBUG_PRINTF7(x) printf x
   #define EDID_DEBUG_PRINTF7(x) printf x
#else
   #define HDMITX_DEBUG_PRINTF7(x)
   #define HDCP_DEBUG_PRINTF7(x)
   #define EDID_DEBUG_PRINTF7(x)
#endif
 
 
#endif//  _DEBUG_H_