Loading drivers/mmc/core/debugfs.c +26 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,26 @@ module_param(fail_request, charp, 0); #endif /* CONFIG_FAIL_MMC_REQUEST */ /* The debugfs functions are optimized away when CONFIG_DEBUG_FS isn't set. */ static int mmc_ring_buffer_show(struct seq_file *s, void *data) { struct mmc_host *mmc = s->private; mmc_dump_trace_buffer(mmc, s); return 0; } static int mmc_ring_buffer_open(struct inode *inode, struct file *file) { return single_open(file, mmc_ring_buffer_show, inode->i_private); } static const struct file_operations mmc_ring_buffer_fops = { .open = mmc_ring_buffer_open, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; static int mmc_ios_show(struct seq_file *s, void *data) { static const char *vdd_str[] = { Loading Loading @@ -374,6 +394,12 @@ void mmc_add_host_debugfs(struct mmc_host *host) &mmc_err_state)) goto err_node; #ifdef CONFIG_MMC_RING_BUFFER if (!debugfs_create_file("ring_buffer", S_IRUSR, root, host, &mmc_ring_buffer_fops)) goto err_node; #endif #ifdef CONFIG_MMC_CLKGATE if (!debugfs_create_u32("clk_delay", (S_IRUSR | S_IWUSR), root, &host->clk_delay)) Loading Loading
drivers/mmc/core/debugfs.c +26 −0 Original line number Diff line number Diff line Loading @@ -32,6 +32,26 @@ module_param(fail_request, charp, 0); #endif /* CONFIG_FAIL_MMC_REQUEST */ /* The debugfs functions are optimized away when CONFIG_DEBUG_FS isn't set. */ static int mmc_ring_buffer_show(struct seq_file *s, void *data) { struct mmc_host *mmc = s->private; mmc_dump_trace_buffer(mmc, s); return 0; } static int mmc_ring_buffer_open(struct inode *inode, struct file *file) { return single_open(file, mmc_ring_buffer_show, inode->i_private); } static const struct file_operations mmc_ring_buffer_fops = { .open = mmc_ring_buffer_open, .read = seq_read, .llseek = seq_lseek, .release = single_release, }; static int mmc_ios_show(struct seq_file *s, void *data) { static const char *vdd_str[] = { Loading Loading @@ -374,6 +394,12 @@ void mmc_add_host_debugfs(struct mmc_host *host) &mmc_err_state)) goto err_node; #ifdef CONFIG_MMC_RING_BUFFER if (!debugfs_create_file("ring_buffer", S_IRUSR, root, host, &mmc_ring_buffer_fops)) goto err_node; #endif #ifdef CONFIG_MMC_CLKGATE if (!debugfs_create_u32("clk_delay", (S_IRUSR | S_IWUSR), root, &host->clk_delay)) Loading