diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2013-04-05 15:10:34 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-05 18:49:17 -0400 |
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 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 | ||
606 | int mei_register(struct device *dev); | 611 | #if IS_ENABLED(CONFIG_DEBUG_FS) |
607 | void mei_deregister(void); | 612 | int mei_dbgfs_register(struct mei_device *dev, const char *name); |
613 | void mei_dbgfs_deregister(struct mei_device *dev); | ||
614 | #else | ||
615 | static inline int mei_dbgfs_register(struct mei_device *dev, const char *name) | ||
616 | { | ||
617 | return 0; | ||
618 | } | ||
619 | static inline void mei_dbgfs_deregister(struct mei_device *dev) {} | ||
620 | #endif /* CONFIG_DEBUG_FS */ | ||
621 | |||
622 | int mei_register(struct mei_device *dev); | ||
623 | void 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) \ |