diff options
Diffstat (limited to 'include/linux/debugfs.h')
| -rw-r--r-- | include/linux/debugfs.h | 83 |
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 | ||
| 30 | struct debugfs_reg32 { | ||
| 31 | char *name; | ||
| 32 | unsigned long offset; | ||
| 33 | }; | ||
| 34 | |||
| 35 | struct debugfs_regset32 { | ||
| 36 | struct debugfs_reg32 *regs; | ||
| 37 | int nregs; | ||
| 38 | void __iomem *base; | ||
| 39 | }; | ||
| 40 | |||
| 41 | extern struct dentry *arch_debugfs_dir; | 29 | extern 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; | |||
| 46 | extern const struct file_operations debugfs_file_operations; | 34 | extern const struct file_operations debugfs_file_operations; |
| 47 | extern const struct inode_operations debugfs_link_operations; | 35 | extern const struct inode_operations debugfs_link_operations; |
| 48 | 36 | ||
| 49 | struct dentry *debugfs_create_file(const char *name, umode_t mode, | 37 | struct 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); | |||
| 61 | struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, | 49 | struct 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 | ||
| 64 | struct dentry *debugfs_create_u8(const char *name, umode_t mode, | 52 | struct dentry *debugfs_create_u8(const char *name, mode_t mode, |
| 65 | struct dentry *parent, u8 *value); | 53 | struct dentry *parent, u8 *value); |
| 66 | struct dentry *debugfs_create_u16(const char *name, umode_t mode, | 54 | struct dentry *debugfs_create_u16(const char *name, mode_t mode, |
| 67 | struct dentry *parent, u16 *value); | 55 | struct dentry *parent, u16 *value); |
| 68 | struct dentry *debugfs_create_u32(const char *name, umode_t mode, | 56 | struct dentry *debugfs_create_u32(const char *name, mode_t mode, |
| 69 | struct dentry *parent, u32 *value); | 57 | struct dentry *parent, u32 *value); |
| 70 | struct dentry *debugfs_create_u64(const char *name, umode_t mode, | 58 | struct dentry *debugfs_create_u64(const char *name, mode_t mode, |
| 71 | struct dentry *parent, u64 *value); | 59 | struct dentry *parent, u64 *value); |
| 72 | struct dentry *debugfs_create_x8(const char *name, umode_t mode, | 60 | struct dentry *debugfs_create_x8(const char *name, mode_t mode, |
| 73 | struct dentry *parent, u8 *value); | 61 | struct dentry *parent, u8 *value); |
| 74 | struct dentry *debugfs_create_x16(const char *name, umode_t mode, | 62 | struct dentry *debugfs_create_x16(const char *name, mode_t mode, |
| 75 | struct dentry *parent, u16 *value); | 63 | struct dentry *parent, u16 *value); |
| 76 | struct dentry *debugfs_create_x32(const char *name, umode_t mode, | 64 | struct dentry *debugfs_create_x32(const char *name, mode_t mode, |
| 77 | struct dentry *parent, u32 *value); | 65 | struct dentry *parent, u32 *value); |
| 78 | struct dentry *debugfs_create_x64(const char *name, umode_t mode, | 66 | struct dentry *debugfs_create_x64(const char *name, mode_t mode, |
| 79 | struct dentry *parent, u64 *value); | 67 | struct dentry *parent, u64 *value); |
| 80 | struct dentry *debugfs_create_size_t(const char *name, umode_t mode, | 68 | struct 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); |
| 82 | struct dentry *debugfs_create_bool(const char *name, umode_t mode, | 70 | struct dentry *debugfs_create_bool(const char *name, mode_t mode, |
| 83 | struct dentry *parent, u32 *value); | 71 | struct dentry *parent, u32 *value); |
| 84 | 72 | ||
| 85 | struct dentry *debugfs_create_blob(const char *name, umode_t mode, | 73 | struct 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 | ||
| 89 | struct dentry *debugfs_create_regset32(const char *name, umode_t mode, | ||
| 90 | struct dentry *parent, | ||
| 91 | struct debugfs_regset32 *regset); | ||
| 92 | |||
| 93 | int debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs, | ||
| 94 | int nregs, void __iomem *base, char *prefix); | ||
| 95 | |||
| 96 | struct dentry *debugfs_create_u32_array(const char *name, umode_t mode, | ||
| 97 | struct dentry *parent, | ||
| 98 | u32 *array, u32 elements); | ||
| 99 | |||
| 100 | bool debugfs_initialized(void); | 77 | bool 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 | ||
| 112 | static inline struct dentry *debugfs_create_file(const char *name, umode_t mode, | 89 | static 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 | ||
| 144 | static inline struct dentry *debugfs_create_u8(const char *name, umode_t mode, | 121 | static 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 | ||
| 151 | static inline struct dentry *debugfs_create_u16(const char *name, umode_t mode, | 128 | static 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 | ||
| 158 | static inline struct dentry *debugfs_create_u32(const char *name, umode_t mode, | 135 | static 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 | ||
| 165 | static inline struct dentry *debugfs_create_u64(const char *name, umode_t mode, | 142 | static 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 | ||
| 172 | static inline struct dentry *debugfs_create_x8(const char *name, umode_t mode, | 149 | static 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 | ||
| 179 | static inline struct dentry *debugfs_create_x16(const char *name, umode_t mode, | 156 | static 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 | ||
| 186 | static inline struct dentry *debugfs_create_x32(const char *name, umode_t mode, | 163 | static 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 | ||
| 193 | static inline struct dentry *debugfs_create_size_t(const char *name, umode_t mode, | 170 | static 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 | ||
| 200 | static inline struct dentry *debugfs_create_bool(const char *name, umode_t mode, | 177 | static 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 | ||
| 207 | static inline struct dentry *debugfs_create_blob(const char *name, umode_t mode, | 184 | static 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 | ||
| 214 | static 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 | |||
| 221 | static inline bool debugfs_initialized(void) | 191 | static inline bool debugfs_initialized(void) |
| 222 | { | 192 | { |
| 223 | return false; | 193 | return false; |
| 224 | } | 194 | } |
| 225 | 195 | ||
| 226 | static 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 |
