ASoC: wcd934x-dsp-cntl: add debugfs node to perform debug dumps

Currently, for any WDSP errors, the driver collects the debug
dumps/information based on trigger from userspace. This is protected
under CONFIG_DEBUG_FS and should not be run unless stress tests are
executed and this functionality is explicitly enabled since
performing debug dumps could possible leave the WDSP in bad state.
Add debug node to control dumping debug information and not rely
only on CONFIG_DEBUG_FS

To enable debug dumps:
echo 1 > /sys/kernel/debug/wdsp0/debug_dump_enable

To disable debug dumps:
echo 0 > /sys/kernel/debug/wdsp0/debug_dump_enable

Change-Id: I67d8781839d9caee16e6bf6a5befd9010ccaafc0
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
Signed-off-by: Xiaoyu Ye <benyxy@codeaurora.org>
このコミットが含まれているのは:
Xiaoyu Ye
2018-08-15 18:13:19 -07:00
コミット 30765fcae3
2個のファイルの変更16行の追加5行の削除

ファイルの表示

@@ -91,6 +91,7 @@ struct wcd_dsp_cntl {
struct dentry *entry;
u32 debug_mode;
bool ramdump_enable;
bool dbg_dmp_enable;
/* WDSP manager drivers data */
struct device *m_dev;