summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/skylake/skl.h
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2017-06-30 09:06:05 +0530
committerMark Brown <broonie@kernel.org>2017-06-30 13:27:55 +0100
commit5cdf6c09ca9de3f037ba2d770206f3374459602d (patch)
treee9513d3eb62be6b9dfc7ca88f197e217c866285c /sound/soc/intel/skylake/skl.h
parent46b5a4d249ac6798cee28de9f51ef80777d16a3e (diff)
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>
Diffstat (limited to 'sound/soc/intel/skylake/skl.h')
-rw-r--r--sound/soc/intel/skylake/skl.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/sound/soc/intel/skylake/skl.h b/sound/soc/intel/skylake/skl.h
index 2a630fcb7f08..a47779c819d5 100644
--- a/sound/soc/intel/skylake/skl.h
+++ b/sound/soc/intel/skylake/skl.h
@@ -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 */