aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/mei_dev.h
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2013-04-05 15:10:34 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-05 18:49:17 -0400
commit30e53bb8ffb1f3270ad89196d9799057008d9537 (patch)
tree94fe085a9e40cc0cc215053c4dedaa91acee73ac /drivers/misc/mei/mei_dev.h
parenta864ec76db575b158427ec7fa624cd30ede5e038 (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.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h
index 325f71abeb7a..8806be420f6b 100644
--- a/drivers/misc/mei/mei_dev.h
+++ b/drivers/misc/mei/mei_dev.h
@@ -437,6 +437,11 @@ struct mei_device {
437 /* List of bus devices */ 437 /* List of bus devices */
438 struct list_head device_list; 438 struct list_head device_list;
439 439
440#if IS_ENABLED(CONFIG_DEBUG_FS)
441 struct dentry *dbgfs_dir;
442#endif /* CONFIG_DEBUG_FS */
443
444
440 const struct mei_hw_ops *ops; 445 const struct mei_hw_ops *ops;
441 char hw[0] __aligned(sizeof(void *)); 446 char hw[0] __aligned(sizeof(void *));
442}; 447};
@@ -603,8 +608,19 @@ static inline int mei_count_full_read_slots(struct mei_device *dev)
603 return dev->ops->rdbuf_full_slots(dev); 608 return dev->ops->rdbuf_full_slots(dev);
604} 609}
605 610
606int mei_register(struct device *dev); 611#if IS_ENABLED(CONFIG_DEBUG_FS)
607void mei_deregister(void); 612int mei_dbgfs_register(struct mei_device *dev, const char *name);
613void mei_dbgfs_deregister(struct mei_device *dev);
614#else
615static inline int mei_dbgfs_register(struct mei_device *dev, const char *name)
616{
617 return 0;
618}
619static inline void mei_dbgfs_deregister(struct mei_device *dev) {}
620#endif /* CONFIG_DEBUG_FS */
621
622int mei_register(struct mei_device *dev);
623void mei_deregister(struct mei_device *dev);
608 624
609#define MEI_HDR_FMT "hdr:host=%02d me=%02d len=%d comp=%1d" 625#define MEI_HDR_FMT "hdr:host=%02d me=%02d len=%d comp=%1d"
610#define MEI_HDR_PRM(hdr) \ 626#define MEI_HDR_PRM(hdr) \