18c2ecf20Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0+ 28c2ecf20Sopenharmony_ci/* Copyright (c) 2015-2016 Quantenna Communications. All rights reserved. */ 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ci#include "debug.h" 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_civoid qtnf_debugfs_init(struct qtnf_bus *bus, const char *name) 78c2ecf20Sopenharmony_ci{ 88c2ecf20Sopenharmony_ci struct dentry *parent = qtnf_get_debugfs_dir(); 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci bus->dbg_dir = debugfs_create_dir(name, parent); 118c2ecf20Sopenharmony_ci} 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_civoid qtnf_debugfs_remove(struct qtnf_bus *bus) 148c2ecf20Sopenharmony_ci{ 158c2ecf20Sopenharmony_ci debugfs_remove_recursive(bus->dbg_dir); 168c2ecf20Sopenharmony_ci bus->dbg_dir = NULL; 178c2ecf20Sopenharmony_ci} 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_civoid qtnf_debugfs_add_entry(struct qtnf_bus *bus, const char *name, 208c2ecf20Sopenharmony_ci int (*fn)(struct seq_file *seq, void *data)) 218c2ecf20Sopenharmony_ci{ 228c2ecf20Sopenharmony_ci debugfs_create_devm_seqfile(bus->dev, name, bus->dbg_dir, fn); 238c2ecf20Sopenharmony_ci} 24