ASoC: Intel: Skylake: Add debugfs support

For debug, the kernel debugfs mechanism is available. We can add various
debug options for driver like module configuration read, firmware register
read etc.

This patch adds debugfs as a child to asoc plaform component and caller is
added for skylake driver to do init and cleanup of debugfs.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Vunny Sodhi <vunnyx.sodhi@intel.com>
Signed-off-by: Guneshwor Singh <guneshwor.o.singh@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
此提交包含在:
Vinod Koul
2017-06-30 09:06:05 +05:30
提交者 Mark Brown
父節點 46b5a4d249
當前提交 5cdf6c09ca
共有 5 個檔案被更改,包括 82 行新增1 行删除

查看文件

@@ -42,6 +42,8 @@ struct skl_dsp_resource {
u32 mem;
};
struct skl_debug;
struct skl {
struct hdac_ext_bus ebus;
struct pci_dev *pci;
@@ -66,6 +68,8 @@ struct skl {
int supend_active;
struct work_struct probe_work;
struct skl_debug *debugfs;
};
#define skl_to_ebus(s) (&(s)->ebus)
@@ -116,4 +120,16 @@ void skl_update_d0i3c(struct device *dev, bool enable);
int skl_nhlt_create_sysfs(struct skl *skl);
void skl_nhlt_remove_sysfs(struct skl *skl);
#ifdef CONFIG_DEBUG_FS
struct skl_debug *skl_debugfs_init(struct skl *skl);
void skl_debugfs_exit(struct skl_debug *d);
#else
static inline struct skl_debug *skl_debugfs_init(struct skl *skl)
{
return NULL;
}
static inline void skl_debugfs_exit(struct skl_debug *d)
{}
#endif
#endif /* __SOUND_SOC_SKL_H */