dmaengine: Create debug directories for DMA devices
Create a placeholder directory for each registered DMA device. DMA drivers can use the dmaengine_get_debugfs_root() call to get their debugfs root and can populate with custom files to aim debugging. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/20200306142839.17910-4-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:

committed by
Vinod Koul

parent
db8d9b4c9b
commit
26cf132de6
@@ -182,4 +182,20 @@ dmaengine_desc_callback_valid(struct dmaengine_desc_callback *cb)
|
||||
struct dma_chan *dma_get_slave_channel(struct dma_chan *chan);
|
||||
struct dma_chan *dma_get_any_slave_channel(struct dma_device *device);
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
#include <linux/debugfs.h>
|
||||
|
||||
static inline struct dentry *
|
||||
dmaengine_get_debugfs_root(struct dma_device *dma_dev) {
|
||||
return dma_dev->dbg_dev_root;
|
||||
}
|
||||
#else
|
||||
struct dentry;
|
||||
static inline struct dentry *
|
||||
dmaengine_get_debugfs_root(struct dma_device *dma_dev)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
#endif /* CONFIG_DEBUG_FS */
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user