diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2013-04-05 22:10:34 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-05 15:49:17 -0700 |
commit | 30e53bb8ffb1f3270ad89196d9799057008d9537 (patch) | |
tree | 94fe085a9e40cc0cc215053c4dedaa91acee73ac /drivers/misc/mei/mei_dev.h | |
parent | a864ec76db575b158427ec7fa624cd30ede5e038 (diff) |
mei: add debugfs hooks
debugfs exposes device state and list of me clients and their
properties
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/mei_dev.h')
-rw-r--r-- | drivers/misc/mei/mei_dev.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index 325f71abeb7..8806be420f6 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h @@ -437,6 +437,11 @@ struct mei_device { /* List of bus devices */ struct list_head device_list; +#if IS_ENABLED(CONFIG_DEBUG_FS) + struct dentry *dbgfs_dir; +#endif /* CONFIG_DEBUG_FS */ + + const struct mei_hw_ops *ops; char hw[0] __aligned(sizeof(void *)); }; @@ -603,8 +608,19 @@ static inline int mei_count_full_read_slots(struct mei_device *dev) return dev->ops->rdbuf_full_slots(dev); } -int mei_register(struct device *dev); -void mei_deregister(void); +#if IS_ENABLED(CONFIG_DEBUG_FS) +int mei_dbgfs_register(struct mei_device *dev, const char *name); +void mei_dbgfs_deregister(struct mei_device *dev); +#else +static inline int mei_dbgfs_register(struct mei_device *dev, const char *name) +{ + return 0; +} +static inline void mei_dbgfs_deregister(struct mei_device *dev) {} +#endif /* CONFIG_DEBUG_FS */ + +int mei_register(struct mei_device *dev); +void mei_deregister(struct mei_device *dev); #define MEI_HDR_FMT "hdr:host=%02d me=%02d len=%d comp=%1d" #define MEI_HDR_PRM(hdr) \ |