aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/debugfs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/debugfs.h')
-rw-r--r--include/linux/debugfs.h83
1 files changed, 23 insertions, 60 deletions
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index 66c434f5dd1..e7d9b20ddc5 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -16,7 +16,6 @@
16#define _DEBUGFS_H_ 16#define _DEBUGFS_H_
17 17
18#include <linux/fs.h> 18#include <linux/fs.h>
19#include <linux/seq_file.h>
20 19
21#include <linux/types.h> 20#include <linux/types.h>
22 21
@@ -27,17 +26,6 @@ struct debugfs_blob_wrapper {
27 unsigned long size; 26 unsigned long size;
28}; 27};
29 28
30struct debugfs_reg32 {
31 char *name;
32 unsigned long offset;
33};
34
35struct debugfs_regset32 {
36 struct debugfs_reg32 *regs;
37 int nregs;
38 void __iomem *base;
39};
40
41extern struct dentry *arch_debugfs_dir; 29extern struct dentry *arch_debugfs_dir;
42 30
43#if defined(CONFIG_DEBUG_FS) 31#if defined(CONFIG_DEBUG_FS)
@@ -46,7 +34,7 @@ extern struct dentry *arch_debugfs_dir;
46extern const struct file_operations debugfs_file_operations; 34extern const struct file_operations debugfs_file_operations;
47extern const struct inode_operations debugfs_link_operations; 35extern const struct inode_operations debugfs_link_operations;
48 36
49struct dentry *debugfs_create_file(const char *name, umode_t mode, 37struct dentry *debugfs_create_file(const char *name, mode_t mode,
50 struct dentry *parent, void *data, 38 struct dentry *parent, void *data,
51 const struct file_operations *fops); 39 const struct file_operations *fops);
52 40
@@ -61,42 +49,31 @@ void debugfs_remove_recursive(struct dentry *dentry);
61struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, 49struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry,
62 struct dentry *new_dir, const char *new_name); 50 struct dentry *new_dir, const char *new_name);
63 51
64struct dentry *debugfs_create_u8(const char *name, umode_t mode, 52struct dentry *debugfs_create_u8(const char *name, mode_t mode,
65 struct dentry *parent, u8 *value); 53 struct dentry *parent, u8 *value);
66struct dentry *debugfs_create_u16(const char *name, umode_t mode, 54struct dentry *debugfs_create_u16(const char *name, mode_t mode,
67 struct dentry *parent, u16 *value); 55 struct dentry *parent, u16 *value);
68struct dentry *debugfs_create_u32(const char *name, umode_t mode, 56struct dentry *debugfs_create_u32(const char *name, mode_t mode,
69 struct dentry *parent, u32 *value); 57 struct dentry *parent, u32 *value);
70struct dentry *debugfs_create_u64(const char *name, umode_t mode, 58struct dentry *debugfs_create_u64(const char *name, mode_t mode,
71 struct dentry *parent, u64 *value); 59 struct dentry *parent, u64 *value);
72struct dentry *debugfs_create_x8(const char *name, umode_t mode, 60struct dentry *debugfs_create_x8(const char *name, mode_t mode,
73 struct dentry *parent, u8 *value); 61 struct dentry *parent, u8 *value);
74struct dentry *debugfs_create_x16(const char *name, umode_t mode, 62struct dentry *debugfs_create_x16(const char *name, mode_t mode,
75 struct dentry *parent, u16 *value); 63 struct dentry *parent, u16 *value);
76struct dentry *debugfs_create_x32(const char *name, umode_t mode, 64struct dentry *debugfs_create_x32(const char *name, mode_t mode,
77 struct dentry *parent, u32 *value); 65 struct dentry *parent, u32 *value);
78struct dentry *debugfs_create_x64(const char *name, umode_t mode, 66struct dentry *debugfs_create_x64(const char *name, mode_t mode,
79 struct dentry *parent, u64 *value); 67 struct dentry *parent, u64 *value);
80struct dentry *debugfs_create_size_t(const char *name, umode_t mode, 68struct dentry *debugfs_create_size_t(const char *name, mode_t mode,
81 struct dentry *parent, size_t *value); 69 struct dentry *parent, size_t *value);
82struct dentry *debugfs_create_bool(const char *name, umode_t mode, 70struct dentry *debugfs_create_bool(const char *name, mode_t mode,
83 struct dentry *parent, u32 *value); 71 struct dentry *parent, u32 *value);
84 72
85struct dentry *debugfs_create_blob(const char *name, umode_t mode, 73struct dentry *debugfs_create_blob(const char *name, mode_t mode,
86 struct dentry *parent, 74 struct dentry *parent,
87 struct debugfs_blob_wrapper *blob); 75 struct debugfs_blob_wrapper *blob);
88 76
89struct dentry *debugfs_create_regset32(const char *name, umode_t mode,
90 struct dentry *parent,
91 struct debugfs_regset32 *regset);
92
93int debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs,
94 int nregs, void __iomem *base, char *prefix);
95
96struct dentry *debugfs_create_u32_array(const char *name, umode_t mode,
97 struct dentry *parent,
98 u32 *array, u32 elements);
99
100bool debugfs_initialized(void); 77bool debugfs_initialized(void);
101 78
102#else 79#else
@@ -109,7 +86,7 @@ bool debugfs_initialized(void);
109 * want to duplicate the design decision mistakes of procfs and devfs again. 86 * want to duplicate the design decision mistakes of procfs and devfs again.
110 */ 87 */
111 88
112static inline struct dentry *debugfs_create_file(const char *name, umode_t mode, 89static inline struct dentry *debugfs_create_file(const char *name, mode_t mode,
113 struct dentry *parent, void *data, 90 struct dentry *parent, void *data,
114 const struct file_operations *fops) 91 const struct file_operations *fops)
115{ 92{
@@ -141,95 +118,81 @@ static inline struct dentry *debugfs_rename(struct dentry *old_dir, struct dentr
141 return ERR_PTR(-ENODEV); 118 return ERR_PTR(-ENODEV);
142} 119}
143 120
144static inline struct dentry *debugfs_create_u8(const char *name, umode_t mode, 121static inline struct dentry *debugfs_create_u8(const char *name, mode_t mode,
145 struct dentry *parent, 122 struct dentry *parent,
146 u8 *value) 123 u8 *value)
147{ 124{
148 return ERR_PTR(-ENODEV); 125 return ERR_PTR(-ENODEV);
149} 126}
150 127
151static inline struct dentry *debugfs_create_u16(const char *name, umode_t mode, 128static inline struct dentry *debugfs_create_u16(const char *name, mode_t mode,
152 struct dentry *parent, 129 struct dentry *parent,
153 u16 *value) 130 u16 *value)
154{ 131{
155 return ERR_PTR(-ENODEV); 132 return ERR_PTR(-ENODEV);
156} 133}
157 134
158static inline struct dentry *debugfs_create_u32(const char *name, umode_t mode, 135static inline struct dentry *debugfs_create_u32(const char *name, mode_t mode,
159 struct dentry *parent, 136 struct dentry *parent,
160 u32 *value) 137 u32 *value)
161{ 138{
162 return ERR_PTR(-ENODEV); 139 return ERR_PTR(-ENODEV);
163} 140}
164 141
165static inline struct dentry *debugfs_create_u64(const char *name, umode_t mode, 142static inline struct dentry *debugfs_create_u64(const char *name, mode_t mode,
166 struct dentry *parent, 143 struct dentry *parent,
167 u64 *value) 144 u64 *value)
168{ 145{
169 return ERR_PTR(-ENODEV); 146 return ERR_PTR(-ENODEV);
170} 147}
171 148
172static inline struct dentry *debugfs_create_x8(const char *name, umode_t mode, 149static inline struct dentry *debugfs_create_x8(const char *name, mode_t mode,
173 struct dentry *parent, 150 struct dentry *parent,
174 u8 *value) 151 u8 *value)
175{ 152{
176 return ERR_PTR(-ENODEV); 153 return ERR_PTR(-ENODEV);
177} 154}
178 155
179static inline struct dentry *debugfs_create_x16(const char *name, umode_t mode, 156static inline struct dentry *debugfs_create_x16(const char *name, mode_t mode,
180 struct dentry *parent, 157 struct dentry *parent,
181 u16 *value) 158 u16 *value)
182{ 159{
183 return ERR_PTR(-ENODEV); 160 return ERR_PTR(-ENODEV);
184} 161}
185 162
186static inline struct dentry *debugfs_create_x32(const char *name, umode_t mode, 163static inline struct dentry *debugfs_create_x32(const char *name, mode_t mode,
187 struct dentry *parent, 164 struct dentry *parent,
188 u32 *value) 165 u32 *value)
189{ 166{
190 return ERR_PTR(-ENODEV); 167 return ERR_PTR(-ENODEV);
191} 168}
192 169
193static inline struct dentry *debugfs_create_size_t(const char *name, umode_t mode, 170static inline struct dentry *debugfs_create_size_t(const char *name, mode_t mode,
194 struct dentry *parent, 171 struct dentry *parent,
195 size_t *value) 172 size_t *value)
196{ 173{
197 return ERR_PTR(-ENODEV); 174 return ERR_PTR(-ENODEV);
198} 175}
199 176
200static inline struct dentry *debugfs_create_bool(const char *name, umode_t mode, 177static inline struct dentry *debugfs_create_bool(const char *name, mode_t mode,
201 struct dentry *parent, 178 struct dentry *parent,
202 u32 *value) 179 u32 *value)
203{ 180{
204 return ERR_PTR(-ENODEV); 181 return ERR_PTR(-ENODEV);
205} 182}
206 183
207static inline struct dentry *debugfs_create_blob(const char *name, umode_t mode, 184static inline struct dentry *debugfs_create_blob(const char *name, mode_t mode,
208 struct dentry *parent, 185 struct dentry *parent,
209 struct debugfs_blob_wrapper *blob) 186 struct debugfs_blob_wrapper *blob)
210{ 187{
211 return ERR_PTR(-ENODEV); 188 return ERR_PTR(-ENODEV);
212} 189}
213 190
214static inline struct dentry *debugfs_create_regset32(const char *name,
215 umode_t mode, struct dentry *parent,
216 struct debugfs_regset32 *regset)
217{
218 return ERR_PTR(-ENODEV);
219}
220
221static inline bool debugfs_initialized(void) 191static inline bool debugfs_initialized(void)
222{ 192{
223 return false; 193 return false;
224} 194}
225 195
226static inline struct dentry *debugfs_create_u32_array(const char *name, umode_t mode,
227 struct dentry *parent,
228 u32 *array, u32 elements)
229{
230 return ERR_PTR(-ENODEV);
231}
232
233#endif 196#endif
234 197
235#endif 198#endif