11da177e4SLinus Torvalds /* 21da177e4SLinus Torvalds * debugfs.h - a tiny little debug file system 31da177e4SLinus Torvalds * 41da177e4SLinus Torvalds * Copyright (C) 2004 Greg Kroah-Hartman <[email protected]> 51da177e4SLinus Torvalds * Copyright (C) 2004 IBM Inc. 61da177e4SLinus Torvalds * 71da177e4SLinus Torvalds * This program is free software; you can redistribute it and/or 81da177e4SLinus Torvalds * modify it under the terms of the GNU General Public License version 91da177e4SLinus Torvalds * 2 as published by the Free Software Foundation. 101da177e4SLinus Torvalds * 111da177e4SLinus Torvalds * debugfs is for people to use instead of /proc or /sys. 1255dff495SRandy Dunlap * See Documentation/DocBook/filesystems for more details. 131da177e4SLinus Torvalds */ 141da177e4SLinus Torvalds 151da177e4SLinus Torvalds #ifndef _DEBUGFS_H_ 161da177e4SLinus Torvalds #define _DEBUGFS_H_ 171da177e4SLinus Torvalds 181da177e4SLinus Torvalds #include <linux/fs.h> 191a087c6aSAlessandro Rubini #include <linux/seq_file.h> 201da177e4SLinus Torvalds 21a7a76cefSRoland Dreier #include <linux/types.h> 2249d200deSNicolai Stange #include <linux/compiler.h> 23a7a76cefSRoland Dreier 24f30d0a81SArend van Spriel struct device; 25a7a76cefSRoland Dreier struct file_operations; 2649d200deSNicolai Stange struct srcu_struct; 27a7a76cefSRoland Dreier 28dd308bc3SMichael Ellerman struct debugfs_blob_wrapper { 29dd308bc3SMichael Ellerman void *data; 30dd308bc3SMichael Ellerman unsigned long size; 31dd308bc3SMichael Ellerman }; 32dd308bc3SMichael Ellerman 331a087c6aSAlessandro Rubini struct debugfs_reg32 { 341a087c6aSAlessandro Rubini char *name; 351a087c6aSAlessandro Rubini unsigned long offset; 361a087c6aSAlessandro Rubini }; 371a087c6aSAlessandro Rubini 381a087c6aSAlessandro Rubini struct debugfs_regset32 { 39833d6e01SFelipe Balbi const struct debugfs_reg32 *regs; 401a087c6aSAlessandro Rubini int nregs; 411a087c6aSAlessandro Rubini void __iomem *base; 421a087c6aSAlessandro Rubini }; 431a087c6aSAlessandro Rubini 44ae79cdaaS[email protected] extern struct dentry *arch_debugfs_dir; 45ae79cdaaS[email protected] 4649d200deSNicolai Stange extern struct srcu_struct debugfs_srcu; 4749d200deSNicolai Stange 4886f0e067SChristian Lamparter /** 4986f0e067SChristian Lamparter * debugfs_real_fops - getter for the real file operation 5086f0e067SChristian Lamparter * @filp: a pointer to a struct file 5186f0e067SChristian Lamparter * 5286f0e067SChristian Lamparter * Must only be called under the protection established by 5386f0e067SChristian Lamparter * debugfs_use_file_start(). 5486f0e067SChristian Lamparter */ 55e41746b0SJakub Kicinski static inline const struct file_operations *debugfs_real_fops(const struct file *filp) 5686f0e067SChristian Lamparter __must_hold(&debugfs_srcu) 5786f0e067SChristian Lamparter { 5886f0e067SChristian Lamparter /* 5986f0e067SChristian Lamparter * Neither the pointer to the struct file_operations, nor its 6086f0e067SChristian Lamparter * contents ever change -- srcu_dereference() is not needed here. 6186f0e067SChristian Lamparter */ 6286f0e067SChristian Lamparter return filp->f_path.dentry->d_fsdata; 6386f0e067SChristian Lamparter } 6486f0e067SChristian Lamparter 657f847dd3SArnd Bergmann #define DEFINE_DEBUGFS_ATTRIBUTE(__fops, __get, __set, __fmt) \ 667f847dd3SArnd Bergmann static int __fops ## _open(struct inode *inode, struct file *file) \ 677f847dd3SArnd Bergmann { \ 687f847dd3SArnd Bergmann __simple_attr_check_format(__fmt, 0ull); \ 697f847dd3SArnd Bergmann return simple_attr_open(inode, file, __get, __set, __fmt); \ 707f847dd3SArnd Bergmann } \ 717f847dd3SArnd Bergmann static const struct file_operations __fops = { \ 727f847dd3SArnd Bergmann .owner = THIS_MODULE, \ 737f847dd3SArnd Bergmann .open = __fops ## _open, \ 747f847dd3SArnd Bergmann .release = simple_attr_release, \ 757f847dd3SArnd Bergmann .read = debugfs_attr_read, \ 767f847dd3SArnd Bergmann .write = debugfs_attr_write, \ 77*895ce6c8SGeliang Tang .llseek = no_llseek, \ 787f847dd3SArnd Bergmann } 797f847dd3SArnd Bergmann 801da177e4SLinus Torvalds #if defined(CONFIG_DEBUG_FS) 813634634eSHarvey Harrison 82a7c5437bSOmar Sandoval struct dentry *debugfs_lookup(const char *name, struct dentry *parent); 83a7c5437bSOmar Sandoval 84f4ae40a6SAl Viro struct dentry *debugfs_create_file(const char *name, umode_t mode, 851da177e4SLinus Torvalds struct dentry *parent, void *data, 8699ac48f5SArjan van de Ven const struct file_operations *fops); 87c6468808SNicolai Stange struct dentry *debugfs_create_file_unsafe(const char *name, umode_t mode, 88c6468808SNicolai Stange struct dentry *parent, void *data, 89c6468808SNicolai Stange const struct file_operations *fops); 901da177e4SLinus Torvalds 91e59b4e91SDavid Howells struct dentry *debugfs_create_file_size(const char *name, umode_t mode, 92e59b4e91SDavid Howells struct dentry *parent, void *data, 93e59b4e91SDavid Howells const struct file_operations *fops, 94e59b4e91SDavid Howells loff_t file_size); 95e59b4e91SDavid Howells 961da177e4SLinus Torvalds struct dentry *debugfs_create_dir(const char *name, struct dentry *parent); 971da177e4SLinus Torvalds 9866f54963SPeter Oberparleiter struct dentry *debugfs_create_symlink(const char *name, struct dentry *parent, 9966f54963SPeter Oberparleiter const char *dest); 10066f54963SPeter Oberparleiter 10193faccbbSEric W. Biederman typedef struct vfsmount *(*debugfs_automount_t)(struct dentry *, void *); 10277b3da6eSAl Viro struct dentry *debugfs_create_automount(const char *name, 10377b3da6eSAl Viro struct dentry *parent, 10493faccbbSEric W. Biederman debugfs_automount_t f, 10577b3da6eSAl Viro void *data); 10677b3da6eSAl Viro 1071da177e4SLinus Torvalds void debugfs_remove(struct dentry *dentry); 1089505e637SHaavard Skinnemoen void debugfs_remove_recursive(struct dentry *dentry); 1091da177e4SLinus Torvalds 11049d200deSNicolai Stange int debugfs_use_file_start(const struct dentry *dentry, int *srcu_idx) 11149d200deSNicolai Stange __acquires(&debugfs_srcu); 11249d200deSNicolai Stange 11349d200deSNicolai Stange void debugfs_use_file_finish(int srcu_idx) __releases(&debugfs_srcu); 11449d200deSNicolai Stange 115c6468808SNicolai Stange ssize_t debugfs_attr_read(struct file *file, char __user *buf, 116c6468808SNicolai Stange size_t len, loff_t *ppos); 117c6468808SNicolai Stange ssize_t debugfs_attr_write(struct file *file, const char __user *buf, 118c6468808SNicolai Stange size_t len, loff_t *ppos); 119c6468808SNicolai Stange 120cfc94cdfSJan Kara struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, 121cfc94cdfSJan Kara struct dentry *new_dir, const char *new_name); 122cfc94cdfSJan Kara 123f4ae40a6SAl Viro struct dentry *debugfs_create_u8(const char *name, umode_t mode, 1241da177e4SLinus Torvalds struct dentry *parent, u8 *value); 125f4ae40a6SAl Viro struct dentry *debugfs_create_u16(const char *name, umode_t mode, 1261da177e4SLinus Torvalds struct dentry *parent, u16 *value); 127f4ae40a6SAl Viro struct dentry *debugfs_create_u32(const char *name, umode_t mode, 1281da177e4SLinus Torvalds struct dentry *parent, u32 *value); 129f4ae40a6SAl Viro struct dentry *debugfs_create_u64(const char *name, umode_t mode, 1308447891fSMichael Ellerman struct dentry *parent, u64 *value); 131c23fe831SViresh Kumar struct dentry *debugfs_create_ulong(const char *name, umode_t mode, 132c23fe831SViresh Kumar struct dentry *parent, unsigned long *value); 133f4ae40a6SAl Viro struct dentry *debugfs_create_x8(const char *name, umode_t mode, 1342ebefc50SRobin Getz struct dentry *parent, u8 *value); 135f4ae40a6SAl Viro struct dentry *debugfs_create_x16(const char *name, umode_t mode, 1362ebefc50SRobin Getz struct dentry *parent, u16 *value); 137f4ae40a6SAl Viro struct dentry *debugfs_create_x32(const char *name, umode_t mode, 1382ebefc50SRobin Getz struct dentry *parent, u32 *value); 139f4ae40a6SAl Viro struct dentry *debugfs_create_x64(const char *name, umode_t mode, 14015b0beaaSHuang Ying struct dentry *parent, u64 *value); 141f4ae40a6SAl Viro struct dentry *debugfs_create_size_t(const char *name, umode_t mode, 1425e078787SInaky Perez-Gonzalez struct dentry *parent, size_t *value); 1433a76e5e0SSeth Jennings struct dentry *debugfs_create_atomic_t(const char *name, umode_t mode, 1443a76e5e0SSeth Jennings struct dentry *parent, atomic_t *value); 145f4ae40a6SAl Viro struct dentry *debugfs_create_bool(const char *name, umode_t mode, 146621a5f7aSViresh Kumar struct dentry *parent, bool *value); 1471da177e4SLinus Torvalds 148f4ae40a6SAl Viro struct dentry *debugfs_create_blob(const char *name, umode_t mode, 149dd308bc3SMichael Ellerman struct dentry *parent, 150dd308bc3SMichael Ellerman struct debugfs_blob_wrapper *blob); 151c0f92ba9SFrederic Weisbecker 15288187398SAl Viro struct dentry *debugfs_create_regset32(const char *name, umode_t mode, 1531a087c6aSAlessandro Rubini struct dentry *parent, 1541a087c6aSAlessandro Rubini struct debugfs_regset32 *regset); 1551a087c6aSAlessandro Rubini 1569761536eSJoe Perches void debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs, 1571a087c6aSAlessandro Rubini int nregs, void __iomem *base, char *prefix); 1581a087c6aSAlessandro Rubini 1599fe2a701SSrivatsa Vaddagiri struct dentry *debugfs_create_u32_array(const char *name, umode_t mode, 1609fe2a701SSrivatsa Vaddagiri struct dentry *parent, 1619fe2a701SSrivatsa Vaddagiri u32 *array, u32 elements); 1629fe2a701SSrivatsa Vaddagiri 16398210b7fSArend van Spriel struct dentry *debugfs_create_devm_seqfile(struct device *dev, const char *name, 16498210b7fSArend van Spriel struct dentry *parent, 16598210b7fSArend van Spriel int (*read_fn)(struct seq_file *s, 16698210b7fSArend van Spriel void *data)); 16798210b7fSArend van Spriel 168c0f92ba9SFrederic Weisbecker bool debugfs_initialized(void); 169c0f92ba9SFrederic Weisbecker 1700642ef6fSRichard Fitzgerald ssize_t debugfs_read_file_bool(struct file *file, char __user *user_buf, 1710642ef6fSRichard Fitzgerald size_t count, loff_t *ppos); 1720642ef6fSRichard Fitzgerald 1730642ef6fSRichard Fitzgerald ssize_t debugfs_write_file_bool(struct file *file, const char __user *user_buf, 1740642ef6fSRichard Fitzgerald size_t count, loff_t *ppos); 1750642ef6fSRichard Fitzgerald 1761da177e4SLinus Torvalds #else 177a7a76cefSRoland Dreier 178a7a76cefSRoland Dreier #include <linux/err.h> 179a7a76cefSRoland Dreier 1801da177e4SLinus Torvalds /* 1811da177e4SLinus Torvalds * We do not return NULL from these functions if CONFIG_DEBUG_FS is not enabled 1821da177e4SLinus Torvalds * so users have a chance to detect if there was a real error or not. We don't 1831da177e4SLinus Torvalds * want to duplicate the design decision mistakes of procfs and devfs again. 1841da177e4SLinus Torvalds */ 1851da177e4SLinus Torvalds 186a7c5437bSOmar Sandoval static inline struct dentry *debugfs_lookup(const char *name, 187a7c5437bSOmar Sandoval struct dentry *parent) 188a7c5437bSOmar Sandoval { 189a7c5437bSOmar Sandoval return ERR_PTR(-ENODEV); 190a7c5437bSOmar Sandoval } 191a7c5437bSOmar Sandoval 192f4ae40a6SAl Viro static inline struct dentry *debugfs_create_file(const char *name, umode_t mode, 193bde11d79SJean Delvare struct dentry *parent, void *data, 194bde11d79SJean Delvare const struct file_operations *fops) 1951da177e4SLinus Torvalds { 1961da177e4SLinus Torvalds return ERR_PTR(-ENODEV); 1971da177e4SLinus Torvalds } 1981da177e4SLinus Torvalds 199e59b4e91SDavid Howells static inline struct dentry *debugfs_create_file_size(const char *name, umode_t mode, 200e59b4e91SDavid Howells struct dentry *parent, void *data, 201e59b4e91SDavid Howells const struct file_operations *fops, 202e59b4e91SDavid Howells loff_t file_size) 203e59b4e91SDavid Howells { 204e59b4e91SDavid Howells return ERR_PTR(-ENODEV); 205e59b4e91SDavid Howells } 206e59b4e91SDavid Howells 2071da177e4SLinus Torvalds static inline struct dentry *debugfs_create_dir(const char *name, 2081da177e4SLinus Torvalds struct dentry *parent) 2091da177e4SLinus Torvalds { 2101da177e4SLinus Torvalds return ERR_PTR(-ENODEV); 2111da177e4SLinus Torvalds } 2121da177e4SLinus Torvalds 21366f54963SPeter Oberparleiter static inline struct dentry *debugfs_create_symlink(const char *name, 21466f54963SPeter Oberparleiter struct dentry *parent, 21566f54963SPeter Oberparleiter const char *dest) 21666f54963SPeter Oberparleiter { 21766f54963SPeter Oberparleiter return ERR_PTR(-ENODEV); 21866f54963SPeter Oberparleiter } 21966f54963SPeter Oberparleiter 22094e1dec7SJiaxing Wang static inline struct dentry *debugfs_create_automount(const char *name, 22194e1dec7SJiaxing Wang struct dentry *parent, 22294e1dec7SJiaxing Wang struct vfsmount *(*f)(void *), 22394e1dec7SJiaxing Wang void *data) 22494e1dec7SJiaxing Wang { 22594e1dec7SJiaxing Wang return ERR_PTR(-ENODEV); 22694e1dec7SJiaxing Wang } 22794e1dec7SJiaxing Wang 2281da177e4SLinus Torvalds static inline void debugfs_remove(struct dentry *dentry) 2291da177e4SLinus Torvalds { } 2301da177e4SLinus Torvalds 2319505e637SHaavard Skinnemoen static inline void debugfs_remove_recursive(struct dentry *dentry) 2329505e637SHaavard Skinnemoen { } 2339505e637SHaavard Skinnemoen 23449d200deSNicolai Stange static inline int debugfs_use_file_start(const struct dentry *dentry, 23549d200deSNicolai Stange int *srcu_idx) 23649d200deSNicolai Stange __acquires(&debugfs_srcu) 23749d200deSNicolai Stange { 23849d200deSNicolai Stange return 0; 23949d200deSNicolai Stange } 24049d200deSNicolai Stange 24149d200deSNicolai Stange static inline void debugfs_use_file_finish(int srcu_idx) 24249d200deSNicolai Stange __releases(&debugfs_srcu) 24349d200deSNicolai Stange { } 24449d200deSNicolai Stange 2457f847dd3SArnd Bergmann static inline ssize_t debugfs_attr_read(struct file *file, char __user *buf, 2467f847dd3SArnd Bergmann size_t len, loff_t *ppos) 2477f847dd3SArnd Bergmann { 2487f847dd3SArnd Bergmann return -ENODEV; 2497f847dd3SArnd Bergmann } 2507f847dd3SArnd Bergmann 2517f847dd3SArnd Bergmann static inline ssize_t debugfs_attr_write(struct file *file, 2527f847dd3SArnd Bergmann const char __user *buf, 2537f847dd3SArnd Bergmann size_t len, loff_t *ppos) 2547f847dd3SArnd Bergmann { 2557f847dd3SArnd Bergmann return -ENODEV; 2567f847dd3SArnd Bergmann } 257c6468808SNicolai Stange 258cfc94cdfSJan Kara static inline struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry, 259cfc94cdfSJan Kara struct dentry *new_dir, char *new_name) 260cfc94cdfSJan Kara { 261cfc94cdfSJan Kara return ERR_PTR(-ENODEV); 262cfc94cdfSJan Kara } 263cfc94cdfSJan Kara 264f4ae40a6SAl Viro static inline struct dentry *debugfs_create_u8(const char *name, umode_t mode, 2651da177e4SLinus Torvalds struct dentry *parent, 2661da177e4SLinus Torvalds u8 *value) 2671da177e4SLinus Torvalds { 2681da177e4SLinus Torvalds return ERR_PTR(-ENODEV); 2691da177e4SLinus Torvalds } 2701da177e4SLinus Torvalds 271f4ae40a6SAl Viro static inline struct dentry *debugfs_create_u16(const char *name, umode_t mode, 2721da177e4SLinus Torvalds struct dentry *parent, 2737b558637SMichal Ostrowski u16 *value) 2741da177e4SLinus Torvalds { 2751da177e4SLinus Torvalds return ERR_PTR(-ENODEV); 2761da177e4SLinus Torvalds } 2771da177e4SLinus Torvalds 278f4ae40a6SAl Viro static inline struct dentry *debugfs_create_u32(const char *name, umode_t mode, 2791da177e4SLinus Torvalds struct dentry *parent, 2807b558637SMichal Ostrowski u32 *value) 2811da177e4SLinus Torvalds { 2821da177e4SLinus Torvalds return ERR_PTR(-ENODEV); 2831da177e4SLinus Torvalds } 2841da177e4SLinus Torvalds 285f4ae40a6SAl Viro static inline struct dentry *debugfs_create_u64(const char *name, umode_t mode, 2868447891fSMichael Ellerman struct dentry *parent, 2878447891fSMichael Ellerman u64 *value) 2888447891fSMichael Ellerman { 2898447891fSMichael Ellerman return ERR_PTR(-ENODEV); 2908447891fSMichael Ellerman } 2918447891fSMichael Ellerman 292f4ae40a6SAl Viro static inline struct dentry *debugfs_create_x8(const char *name, umode_t mode, 2932ebefc50SRobin Getz struct dentry *parent, 2942ebefc50SRobin Getz u8 *value) 2952ebefc50SRobin Getz { 2962ebefc50SRobin Getz return ERR_PTR(-ENODEV); 2972ebefc50SRobin Getz } 2982ebefc50SRobin Getz 299f4ae40a6SAl Viro static inline struct dentry *debugfs_create_x16(const char *name, umode_t mode, 3002ebefc50SRobin Getz struct dentry *parent, 3012ebefc50SRobin Getz u16 *value) 3022ebefc50SRobin Getz { 3032ebefc50SRobin Getz return ERR_PTR(-ENODEV); 3042ebefc50SRobin Getz } 3052ebefc50SRobin Getz 306f4ae40a6SAl Viro static inline struct dentry *debugfs_create_x32(const char *name, umode_t mode, 3072ebefc50SRobin Getz struct dentry *parent, 3082ebefc50SRobin Getz u32 *value) 3092ebefc50SRobin Getz { 3102ebefc50SRobin Getz return ERR_PTR(-ENODEV); 3112ebefc50SRobin Getz } 3122ebefc50SRobin Getz 3133159269eSJohannes Berg static inline struct dentry *debugfs_create_x64(const char *name, umode_t mode, 3143159269eSJohannes Berg struct dentry *parent, 3153159269eSJohannes Berg u64 *value) 3163159269eSJohannes Berg { 3173159269eSJohannes Berg return ERR_PTR(-ENODEV); 3183159269eSJohannes Berg } 3193159269eSJohannes Berg 320f4ae40a6SAl Viro static inline struct dentry *debugfs_create_size_t(const char *name, umode_t mode, 3218adb711fSInaky Perez-Gonzalez struct dentry *parent, 3228adb711fSInaky Perez-Gonzalez size_t *value) 3238adb711fSInaky Perez-Gonzalez { 3248adb711fSInaky Perez-Gonzalez return ERR_PTR(-ENODEV); 3258adb711fSInaky Perez-Gonzalez } 3268adb711fSInaky Perez-Gonzalez 3275b880214SWeijie Yang static inline struct dentry *debugfs_create_atomic_t(const char *name, umode_t mode, 3285b880214SWeijie Yang struct dentry *parent, atomic_t *value) 3295b880214SWeijie Yang { 3305b880214SWeijie Yang return ERR_PTR(-ENODEV); 3315b880214SWeijie Yang } 3325b880214SWeijie Yang 333f4ae40a6SAl Viro static inline struct dentry *debugfs_create_bool(const char *name, umode_t mode, 3341da177e4SLinus Torvalds struct dentry *parent, 335621a5f7aSViresh Kumar bool *value) 3361da177e4SLinus Torvalds { 3371da177e4SLinus Torvalds return ERR_PTR(-ENODEV); 3381da177e4SLinus Torvalds } 3391da177e4SLinus Torvalds 340f4ae40a6SAl Viro static inline struct dentry *debugfs_create_blob(const char *name, umode_t mode, 341dd308bc3SMichael Ellerman struct dentry *parent, 342dd308bc3SMichael Ellerman struct debugfs_blob_wrapper *blob) 343dd308bc3SMichael Ellerman { 344dd308bc3SMichael Ellerman return ERR_PTR(-ENODEV); 345dd308bc3SMichael Ellerman } 346dd308bc3SMichael Ellerman 3471a087c6aSAlessandro Rubini static inline struct dentry *debugfs_create_regset32(const char *name, 34888187398SAl Viro umode_t mode, struct dentry *parent, 3491a087c6aSAlessandro Rubini struct debugfs_regset32 *regset) 3501a087c6aSAlessandro Rubini { 3511a087c6aSAlessandro Rubini return ERR_PTR(-ENODEV); 3521a087c6aSAlessandro Rubini } 3531a087c6aSAlessandro Rubini 3549761536eSJoe Perches static inline void debugfs_print_regs32(struct seq_file *s, const struct debugfs_reg32 *regs, 3555b880214SWeijie Yang int nregs, void __iomem *base, char *prefix) 3565b880214SWeijie Yang { 3575b880214SWeijie Yang } 3585b880214SWeijie Yang 359c0f92ba9SFrederic Weisbecker static inline bool debugfs_initialized(void) 360c0f92ba9SFrederic Weisbecker { 361c0f92ba9SFrederic Weisbecker return false; 362c0f92ba9SFrederic Weisbecker } 363c0f92ba9SFrederic Weisbecker 3649fe2a701SSrivatsa Vaddagiri static inline struct dentry *debugfs_create_u32_array(const char *name, umode_t mode, 3659fe2a701SSrivatsa Vaddagiri struct dentry *parent, 3669fe2a701SSrivatsa Vaddagiri u32 *array, u32 elements) 3679fe2a701SSrivatsa Vaddagiri { 3689fe2a701SSrivatsa Vaddagiri return ERR_PTR(-ENODEV); 3699fe2a701SSrivatsa Vaddagiri } 3709fe2a701SSrivatsa Vaddagiri 37198210b7fSArend van Spriel static inline struct dentry *debugfs_create_devm_seqfile(struct device *dev, 37298210b7fSArend van Spriel const char *name, 37398210b7fSArend van Spriel struct dentry *parent, 37498210b7fSArend van Spriel int (*read_fn)(struct seq_file *s, 37598210b7fSArend van Spriel void *data)) 37698210b7fSArend van Spriel { 37798210b7fSArend van Spriel return ERR_PTR(-ENODEV); 37898210b7fSArend van Spriel } 37998210b7fSArend van Spriel 3800642ef6fSRichard Fitzgerald static inline ssize_t debugfs_read_file_bool(struct file *file, 3810642ef6fSRichard Fitzgerald char __user *user_buf, 3820642ef6fSRichard Fitzgerald size_t count, loff_t *ppos) 3830642ef6fSRichard Fitzgerald { 3840642ef6fSRichard Fitzgerald return -ENODEV; 3850642ef6fSRichard Fitzgerald } 3860642ef6fSRichard Fitzgerald 3870642ef6fSRichard Fitzgerald static inline ssize_t debugfs_write_file_bool(struct file *file, 3880642ef6fSRichard Fitzgerald const char __user *user_buf, 3890642ef6fSRichard Fitzgerald size_t count, loff_t *ppos) 3900642ef6fSRichard Fitzgerald { 3910642ef6fSRichard Fitzgerald return -ENODEV; 3920642ef6fSRichard Fitzgerald } 3930642ef6fSRichard Fitzgerald 3941da177e4SLinus Torvalds #endif 3951da177e4SLinus Torvalds 3961da177e4SLinus Torvalds #endif 397